Skip to content

Commit

Permalink
[GCM] Removing cookies from checkin and registration requests
Browse files Browse the repository at this point in the history
BUG=394627
R=zea@chromium.org

Review URL: https://codereview.chromium.org/395413002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283833 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
fgorski@chromium.org committed Jul 17, 2014
1 parent 97cecab commit c90678e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions google_apis/gcm/engine/checkin_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "base/metrics/histogram.h"
#include "google_apis/gcm/monitoring/gcm_stats_recorder.h"
#include "google_apis/gcm/protocol/checkin.pb.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_status.h"
Expand Down Expand Up @@ -146,6 +147,8 @@ void CheckinRequest::Start() {
net::URLFetcher::Create(checkin_url_, net::URLFetcher::POST, this));
url_fetcher_->SetRequestContext(request_context_getter_);
url_fetcher_->SetUploadData(kRequestContentType, upload_data);
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);
recorder_->RecordCheckinInitiated(request_info_.android_id);
request_start_time_ = base::TimeTicks::Now();
url_fetcher_->Start();
Expand Down
3 changes: 3 additions & 0 deletions google_apis/gcm/engine/registration_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "base/values.h"
#include "google_apis/gcm/monitoring/gcm_stats_recorder.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_status_code.h"
#include "net/url_request/url_fetcher.h"
Expand Down Expand Up @@ -128,6 +129,8 @@ void RegistrationRequest::Start() {
url_fetcher_.reset(net::URLFetcher::Create(
registration_url_, net::URLFetcher::POST, this));
url_fetcher_->SetRequestContext(request_context_getter_);
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
net::LOAD_DO_NOT_SAVE_COOKIES);

std::string android_id = base::Uint64ToString(request_info_.android_id);
std::string auth_header =
Expand Down

0 comments on commit c90678e

Please sign in to comment.