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

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

Issue 601643002: Use a distinct source parameter on gaia endpoints for the reconcilor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uber
Patch Set: Address review comments Created 6 years, 2 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 "google_apis/gaia/gaia_urls.h" 5 #include "google_apis/gaia/gaia_urls.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h"
9 #include "google_apis/gaia/gaia_switches.h" 10 #include "google_apis/gaia/gaia_switches.h"
10 #include "google_apis/google_api_keys.h" 11 #include "google_apis/google_api_keys.h"
11 12
12 namespace { 13 namespace {
13 14
14 // Gaia service constants 15 // Gaia service constants
15 const char kDefaultGaiaUrl[] = "https://accounts.google.com"; 16 const char kDefaultGaiaUrl[] = "https://accounts.google.com";
16 const char kDefaultGoogleApisBaseUrl[] = "https://www.googleapis.com"; 17 const char kDefaultGoogleApisBaseUrl[] = "https://www.googleapis.com";
17 18
18 // API calls from accounts.google.com 19 // API calls from accounts.google.com
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return oauth2_token_info_url_; 239 return oauth2_token_info_url_;
239 } 240 }
240 241
241 const GURL& GaiaUrls::oauth2_revoke_url() const { 242 const GURL& GaiaUrls::oauth2_revoke_url() const {
242 return oauth2_revoke_url_; 243 return oauth2_revoke_url_;
243 } 244 }
244 245
245 const GURL& GaiaUrls::gaia_login_form_realm() const { 246 const GURL& GaiaUrls::gaia_login_form_realm() const {
246 return gaia_url_; 247 return gaia_url_;
247 } 248 }
249
250 GURL GaiaUrls::ListAccountsURLWithSource(const std::string& source) {
251 if (source.empty()) {
252 return list_accounts_url();
253 } else {
254 std::string query = list_accounts_url().query();
255 return list_accounts_url().Resolve(
256 base::StringPrintf("?source=%s&%s", source.c_str(), query.c_str()));
257 }
258 }
259
260 GURL GaiaUrls::GetCheckConnectionInfoURLWithSource(const std::string& source) {
261 return source.empty()
262 ? get_check_connection_info_url()
263 : get_check_connection_info_url().Resolve(
264 base::StringPrintf("?source=%s", source.c_str()));
265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698