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

Side by Side Diff: chrome/service/cloud_print/cloud_print_auth.cc

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 years, 7 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 | Annotate | Revision Log
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 "chrome/service/cloud_print/cloud_print_auth.h" 5 #include "chrome/service/cloud_print/cloud_print_auth.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/common/net/gaia/gaia_urls.h" 9 #include "chrome/common/net/gaia/gaia_urls.h"
10 #include "chrome/service/cloud_print/cloud_print_consts.h" 10 #include "chrome/service/cloud_print/cloud_print_consts.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void CloudPrintAuth::OnNetworkError(int response_code) { 149 void CloudPrintAuth::OnNetworkError(int response_code) {
150 // Since we specify infinite retries on network errors, this should never 150 // Since we specify infinite retries on network errors, this should never
151 // be called. 151 // be called.
152 NOTREACHED() << 152 NOTREACHED() <<
153 "OnNetworkError invoked when not expected, response code is " << 153 "OnNetworkError invoked when not expected, response code is " <<
154 response_code; 154 response_code;
155 } 155 }
156 156
157 CloudPrintURLFetcher::ResponseAction CloudPrintAuth::HandleJSONData( 157 CloudPrintURLFetcher::ResponseAction CloudPrintAuth::HandleJSONData(
158 const content::URLFetcher* source, 158 const net::URLFetcher* source,
159 const GURL& url, 159 const GURL& url,
160 base::DictionaryValue* json_data, 160 base::DictionaryValue* json_data,
161 bool succeeded) { 161 bool succeeded) {
162 if (!succeeded) { 162 if (!succeeded) {
163 VLOG(1) << "CP_AUTH: Creating robot account failed"; 163 VLOG(1) << "CP_AUTH: Creating robot account failed";
164 client_->OnInvalidCredentials(); 164 client_->OnInvalidCredentials();
165 return CloudPrintURLFetcher::STOP_PROCESSING; 165 return CloudPrintURLFetcher::STOP_PROCESSING;
166 } 166 }
167 167
168 std::string auth_code; 168 std::string auth_code;
(...skipping 26 matching lines...) Expand all
195 std::string CloudPrintAuth::GetAuthHeader() { 195 std::string CloudPrintAuth::GetAuthHeader() {
196 DCHECK(!client_login_token_.empty()); 196 DCHECK(!client_login_token_.empty());
197 std::string header; 197 std::string header;
198 header = "Authorization: GoogleLogin auth="; 198 header = "Authorization: GoogleLogin auth=";
199 header += client_login_token_; 199 header += client_login_token_;
200 return header; 200 return header;
201 } 201 }
202 202
203 CloudPrintAuth::~CloudPrintAuth() {} 203 CloudPrintAuth::~CloudPrintAuth() {}
204 204
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_auth.h ('k') | chrome/service/cloud_print/cloud_print_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698