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

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

Issue 819193002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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
« no previous file with comments | « gin/shell/gin_shell_unittest.cc ('k') | google_apis/gcm/tools/mcs_probe.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/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 "base/strings/stringprintf.h"
10 #include "google_apis/gaia/gaia_switches.h" 10 #include "google_apis/gaia/gaia_switches.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const char kOAuth2TokenUrlSuffix[] = "o/oauth2/token"; 42 const char kOAuth2TokenUrlSuffix[] = "o/oauth2/token";
43 43
44 // API calls from www.googleapis.com 44 // API calls from www.googleapis.com
45 const char kOAuth2IssueTokenUrlSuffix[] = "oauth2/v2/IssueToken"; 45 const char kOAuth2IssueTokenUrlSuffix[] = "oauth2/v2/IssueToken";
46 const char kOAuth2TokenInfoUrlSuffix[] = "oauth2/v2/tokeninfo"; 46 const char kOAuth2TokenInfoUrlSuffix[] = "oauth2/v2/tokeninfo";
47 const char kOAuthUserInfoUrlSuffix[] = "oauth2/v1/userinfo"; 47 const char kOAuthUserInfoUrlSuffix[] = "oauth2/v1/userinfo";
48 48
49 void GetSwitchValueWithDefault(const char* switch_value, 49 void GetSwitchValueWithDefault(const char* switch_value,
50 const char* default_value, 50 const char* default_value,
51 std::string* output_value) { 51 std::string* output_value) {
52 CommandLine* command_line = CommandLine::ForCurrentProcess(); 52 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
53 if (command_line->HasSwitch(switch_value)) { 53 if (command_line->HasSwitch(switch_value)) {
54 *output_value = command_line->GetSwitchValueASCII(switch_value); 54 *output_value = command_line->GetSwitchValueASCII(switch_value);
55 } else { 55 } else {
56 *output_value = default_value; 56 *output_value = default_value;
57 } 57 }
58 } 58 }
59 59
60 GURL GetURLSwitchValueWithDefault(const char* switch_value, 60 GURL GetURLSwitchValueWithDefault(const char* switch_value,
61 const char* default_value) { 61 const char* default_value) {
62 std::string string_value; 62 std::string string_value;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 base::StringPrintf("?source=%s&%s", source.c_str(), query.c_str())); 248 base::StringPrintf("?source=%s&%s", source.c_str(), query.c_str()));
249 } 249 }
250 } 250 }
251 251
252 GURL GaiaUrls::GetCheckConnectionInfoURLWithSource(const std::string& source) { 252 GURL GaiaUrls::GetCheckConnectionInfoURLWithSource(const std::string& source) {
253 return source.empty() 253 return source.empty()
254 ? get_check_connection_info_url_ 254 ? get_check_connection_info_url_
255 : get_check_connection_info_url_.Resolve( 255 : get_check_connection_info_url_.Resolve(
256 base::StringPrintf("?source=%s", source.c_str())); 256 base::StringPrintf("?source=%s", source.c_str()));
257 } 257 }
OLDNEW
« no previous file with comments | « gin/shell/gin_shell_unittest.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698