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

Side by Side Diff: chrome/browser/net/gaia/gaia_oauth_fetcher.cc

Issue 104493005: Update some uses of Value in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years 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 | « chrome/browser/net/firefox_proxy_settings.cc ('k') | chrome/browser/net/net_log_temp_file.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 "chrome/browser/net/gaia/gaia_oauth_fetcher.h" 5 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 } 236 }
237 } 237 }
238 238
239 // Helper method that extracts tokens from a successful reply. 239 // Helper method that extracts tokens from a successful reply.
240 // static 240 // static
241 void GaiaOAuthFetcher::ParseUserInfoResponse(const std::string& data, 241 void GaiaOAuthFetcher::ParseUserInfoResponse(const std::string& data,
242 std::string* email_result) { 242 std::string* email_result) {
243 scoped_ptr<base::Value> value(base::JSONReader::Read(data)); 243 scoped_ptr<base::Value> value(base::JSONReader::Read(data));
244 if (value->GetType() == base::Value::TYPE_DICTIONARY) { 244 if (value->GetType() == base::Value::TYPE_DICTIONARY) {
245 Value* email_value; 245 base::Value* email_value;
246 DictionaryValue* dict = static_cast<DictionaryValue*>(value.get()); 246 base::DictionaryValue* dict =
247 static_cast<base::DictionaryValue*>(value.get());
247 if (dict->Get("email", &email_value)) { 248 if (dict->Get("email", &email_value)) {
248 if (email_value->GetType() == base::Value::TYPE_STRING) { 249 if (email_value->GetType() == base::Value::TYPE_STRING) {
249 email_value->GetAsString(email_result); 250 email_value->GetAsString(email_result);
250 } 251 }
251 } 252 }
252 } 253 }
253 } 254 }
254 255
255 void GaiaOAuthFetcher::StartOAuthLogin( 256 void GaiaOAuthFetcher::StartOAuthLogin(
256 const char* source, 257 const char* source,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 break; 556 break;
556 case OAUTH2_REVOKE_TOKEN: 557 case OAUTH2_REVOKE_TOKEN:
557 OnOAuthRevokeTokenFetched(data, status, response_code); 558 OnOAuthRevokeTokenFetched(data, status, response_code);
558 break; 559 break;
559 } 560 }
560 } 561 }
561 562
562 bool GaiaOAuthFetcher::ShouldAutoFetch(RequestType fetch_step) { 563 bool GaiaOAuthFetcher::ShouldAutoFetch(RequestType fetch_step) {
563 return fetch_step <= auto_fetch_limit_; 564 return fetch_step <= auto_fetch_limit_;
564 } 565 }
OLDNEW
« no previous file with comments | « chrome/browser/net/firefox_proxy_settings.cc ('k') | chrome/browser/net/net_log_temp_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698