Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: cloud_print/service/service_state.cc

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cloud_print/service/service_state.h" 5 #include "cloud_print/service/service_state.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 GURL url(kClientLoginUrl); 168 GURL url(kClientLoginUrl);
169 169
170 std::string post_body; 170 std::string post_body;
171 post_body += "accountType=GOOGLE"; 171 post_body += "accountType=GOOGLE";
172 post_body += "&Email=" + net::EscapeUrlEncodedData(email, true); 172 post_body += "&Email=" + net::EscapeUrlEncodedData(email, true);
173 post_body += "&Passwd=" + net::EscapeUrlEncodedData(password, true); 173 post_body += "&Passwd=" + net::EscapeUrlEncodedData(password, true);
174 post_body += "&source=" + net::EscapeUrlEncodedData("CP-Service", true); 174 post_body += "&source=" + net::EscapeUrlEncodedData("CP-Service", true);
175 post_body += "&service=" + net::EscapeUrlEncodedData(service, true); 175 post_body += "&service=" + net::EscapeUrlEncodedData(service, true);
176 176
177 scoped_ptr<net::URLRequest> request(context->CreateRequest( 177 scoped_ptr<net::URLRequest> request(context->CreateRequest(
178 url, net::DEFAULT_PRIORITY, &fetcher_delegate, NULL)); 178 url, net::DEFAULT_PRIORITY, &fetcher_delegate));
179 int load_flags = request->load_flags(); 179 int load_flags = request->load_flags();
180 load_flags = load_flags | net::LOAD_DO_NOT_SEND_COOKIES; 180 load_flags = load_flags | net::LOAD_DO_NOT_SEND_COOKIES;
181 load_flags = load_flags | net::LOAD_DO_NOT_SAVE_COOKIES; 181 load_flags = load_flags | net::LOAD_DO_NOT_SAVE_COOKIES;
182 request->SetLoadFlags(load_flags); 182 request->SetLoadFlags(load_flags);
183 183
184 scoped_ptr<net::UploadElementReader> reader( 184 scoped_ptr<net::UploadElementReader> reader(
185 net::UploadOwnedBytesElementReader::CreateWithString(post_body)); 185 net::UploadOwnedBytesElementReader::CreateWithString(post_body));
186 request->set_upload( 186 request->set_upload(
187 net::ElementsUploadDataStream::CreateWithReader(reader.Pass(), 0)); 187 net::ElementsUploadDataStream::CreateWithReader(reader.Pass(), 0));
188 request->SetExtraRequestHeaderByName( 188 request->SetExtraRequestHeaderByName(
(...skipping 23 matching lines...) Expand all
212 const std::string& password, 212 const std::string& password,
213 const std::string& proxy_id) { 213 const std::string& proxy_id) {
214 robot_token_.clear(); 214 robot_token_.clear();
215 robot_email_.clear(); 215 robot_email_.clear();
216 email_ = email; 216 email_ = email;
217 proxy_id_ = proxy_id; 217 proxy_id_ = proxy_id;
218 auth_token_ = LoginToGoogle("cloudprint", email_, password); 218 auth_token_ = LoginToGoogle("cloudprint", email_, password);
219 xmpp_auth_token_ = LoginToGoogle("chromiumsync", email_, password); 219 xmpp_auth_token_ = LoginToGoogle("chromiumsync", email_, password);
220 return IsValid(); 220 return IsValid();
221 } 221 }
OLDNEW
« no previous file with comments | « chromecast/net/connectivity_checker.cc ('k') | components/cronet/android/cronet_url_request_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698