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

Side by Side Diff: google_apis/gaia/oauth2_mint_token_flow.cc

Issue 17034006: Add base namespace to more values in sync and elsewhere. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher.cc ('k') | gpu/config/gpu_control_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "google_apis/gaia/oauth2_mint_token_flow.h" 5 #include "google_apis/gaia/oauth2_mint_token_flow.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 net::EscapeUrlEncodedData(parameters_.extension_id, true).c_str()); 151 net::EscapeUrlEncodedData(parameters_.extension_id, true).c_str());
152 } 152 }
153 153
154 void OAuth2MintTokenFlow::ProcessApiCallSuccess( 154 void OAuth2MintTokenFlow::ProcessApiCallSuccess(
155 const net::URLFetcher* source) { 155 const net::URLFetcher* source) {
156 // TODO(munjal): Change error code paths in this method to report an 156 // TODO(munjal): Change error code paths in this method to report an
157 // internal error. 157 // internal error.
158 std::string response_body; 158 std::string response_body;
159 source->GetResponseAsString(&response_body); 159 source->GetResponseAsString(&response_body);
160 scoped_ptr<base::Value> value(base::JSONReader::Read(response_body)); 160 scoped_ptr<base::Value> value(base::JSONReader::Read(response_body));
161 DictionaryValue* dict = NULL; 161 base::DictionaryValue* dict = NULL;
162 if (!value.get() || !value->GetAsDictionary(&dict)) { 162 if (!value.get() || !value->GetAsDictionary(&dict)) {
163 ReportFailure(GoogleServiceAuthError::FromConnectionError(101)); 163 ReportFailure(GoogleServiceAuthError::FromConnectionError(101));
164 return; 164 return;
165 } 165 }
166 166
167 std::string issue_advice; 167 std::string issue_advice;
168 if (!dict->GetString(kIssueAdviceKey, &issue_advice)) { 168 if (!dict->GetString(kIssueAdviceKey, &issue_advice)) {
169 ReportFailure(GoogleServiceAuthError::FromConnectionError(101)); 169 ReportFailure(GoogleServiceAuthError::FromConnectionError(101));
170 return; 170 return;
171 } 171 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 for (size_t i = 0; i < entry.details.size(); i++) 247 for (size_t i = 0; i < entry.details.size(); i++)
248 TrimWhitespace(entry.details[i], TRIM_ALL, &entry.details[i]); 248 TrimWhitespace(entry.details[i], TRIM_ALL, &entry.details[i]);
249 issue_advice->push_back(entry); 249 issue_advice->push_back(entry);
250 } 250 }
251 251
252 if (!success) 252 if (!success)
253 issue_advice->clear(); 253 issue_advice->clear();
254 254
255 return success; 255 return success;
256 } 256 }
OLDNEW
« no previous file with comments | « google_apis/gaia/oauth2_access_token_fetcher.cc ('k') | gpu/config/gpu_control_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698