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

Side by Side Diff: chrome/common/net/gaia/oauth2_api_call_flow.cc

Issue 10836182: Obfuscated Gaia ID fetcher (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 "chrome/common/net/gaia/oauth2_api_call_flow.h" 5 #include "chrome/common/net/gaia/oauth2_api_call_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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 OAuth2ApiCallFlow::~OAuth2ApiCallFlow() {} 48 OAuth2ApiCallFlow::~OAuth2ApiCallFlow() {}
49 49
50 void OAuth2ApiCallFlow::Start() { 50 void OAuth2ApiCallFlow::Start() {
51 BeginApiCall(); 51 BeginApiCall();
52 } 52 }
53 53
54 void OAuth2ApiCallFlow::BeginApiCall() { 54 void OAuth2ApiCallFlow::BeginApiCall() {
55 CHECK(state_ == INITIAL || state_ == MINT_ACCESS_TOKEN_DONE); 55 CHECK(state_ == INITIAL || state_ == MINT_ACCESS_TOKEN_DONE);
56 LOG(INFO) << "*** OAuth2ApiCallFlow::BeginApiCall called ***";
Munjal (Google) 2012/08/09 21:44:29 Remove this (revert this file).
Pete Williamson 2012/08/13 21:21:14 Done.
56 57
57 // If the access token is empty then directly try to mint one. 58 // If the access token is empty then directly try to mint one.
58 if (access_token_.empty()) { 59 if (access_token_.empty()) {
59 BeginMintAccessToken(); 60 BeginMintAccessToken();
60 } else { 61 } else {
61 state_ = API_CALL_STARTED; 62 state_ = API_CALL_STARTED;
62 url_fetcher_.reset(CreateURLFetcher()); 63 url_fetcher_.reset(CreateURLFetcher());
63 url_fetcher_->Start(); // OnURLFetchComplete will be called. 64 url_fetcher_->Start(); // OnURLFetchComplete will be called.
64 } 65 }
65 } 66 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 result->SetRequestContext(context_); 159 result->SetRequestContext(context_);
159 result->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES | 160 result->SetLoadFlags(net::LOAD_DO_NOT_SEND_COOKIES |
160 net::LOAD_DO_NOT_SAVE_COOKIES); 161 net::LOAD_DO_NOT_SAVE_COOKIES);
161 result->AddExtraRequestHeader(MakeAuthorizationHeader(access_token_)); 162 result->AddExtraRequestHeader(MakeAuthorizationHeader(access_token_));
162 163
163 if (!empty_body) 164 if (!empty_body)
164 result->SetUploadData("application/x-www-form-urlencoded", body); 165 result->SetUploadData("application/x-www-form-urlencoded", body);
165 166
166 return result; 167 return result;
167 } 168 }
OLDNEW
« chrome/browser/extensions/api/push_messaging/stub_url_fetcher.h ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698