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

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

Issue 13542003: Add browser test for new user CrOS login flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
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 "google_apis/gaia/gaia_switches.h" 8 #include "google_apis/gaia/gaia_switches.h"
9 #include "google_apis/google_api_keys.h" 9 #include "google_apis/google_api_keys.h"
10 10
11 namespace { 11 namespace {
12 12
13 // Gaia service constants 13 // Gaia service constants
14 const char kDefaultGaiaBaseUrl[] = "accounts.google.com"; 14 const char kDefaultGaiaBaseUrl[] = "localhost:8040";
Nikita (slow) 2013/04/05 18:00:51 Test change, you need to support configuring this
15 const char kDefaultGoogleApisBaseUrl[] = "www.googleapis.com"; 15 const char kDefaultGoogleApisBaseUrl[] = "www.googleapis.com";
16 const char kCaptchaUrlPrefixSuffix[] = "/"; 16 const char kCaptchaUrlPrefixSuffix[] = "/";
17 17
18 // API calls from accounts.google.com 18 // API calls from accounts.google.com
19 const char kClientLoginUrlSuffix[] = "/ClientLogin"; 19 const char kClientLoginUrlSuffix[] = "/ClientLogin";
20 const char kServiceLoginUrlSuffix[] = "/ServiceLogin"; 20 const char kServiceLoginUrlSuffix[] = "/ServiceLogin";
21 const char kIssueAuthTokenUrlSuffix[] = "/IssueAuthToken"; 21 const char kIssueAuthTokenUrlSuffix[] = "/IssueAuthToken";
22 const char kGetUserInfoUrlSuffix[] = "/GetUserInfo"; 22 const char kGetUserInfoUrlSuffix[] = "/GetUserInfo";
23 const char kTokenAuthUrlSuffix[] = "/TokenAuth"; 23 const char kTokenAuthUrlSuffix[] = "/TokenAuth";
24 const char kMergeSessionUrlSuffix[] = "/MergeSession"; 24 const char kMergeSessionUrlSuffix[] = "/MergeSession";
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 std::string lso_base; 67 std::string lso_base;
68 GetSwitchValueWithDefault(switches::kLsoHost, kDefaultGaiaBaseUrl, 68 GetSwitchValueWithDefault(switches::kLsoHost, kDefaultGaiaBaseUrl,
69 &lso_base); 69 &lso_base);
70 70
71 std::string google_apis_base; 71 std::string google_apis_base;
72 GetSwitchValueWithDefault(switches::kGoogleApisHost, 72 GetSwitchValueWithDefault(switches::kGoogleApisHost,
73 kDefaultGoogleApisBaseUrl, 73 kDefaultGoogleApisBaseUrl,
74 &google_apis_base); 74 &google_apis_base);
75 75
76 captcha_url_prefix_ = "http://" + host_base + kCaptchaUrlPrefixSuffix; 76 captcha_url_prefix_ = "http://" + host_base + kCaptchaUrlPrefixSuffix;
77 gaia_origin_url_ = "https://" + host_base; 77 gaia_origin_url_ = "http://" + host_base;
Nikita (slow) 2013/04/05 18:00:51 Same here.
78 lso_origin_url_ = "https://" + lso_base; 78 lso_origin_url_ = "https://" + lso_base;
79 google_apis_origin_url_ = "https://" + google_apis_base; 79 google_apis_origin_url_ = "https://" + google_apis_base;
80 std::string gaia_url_base = gaia_origin_url_; 80 std::string gaia_url_base = gaia_origin_url_;
81 if (command_line->HasSwitch(switches::kGaiaUrlPath)) { 81 if (command_line->HasSwitch(switches::kGaiaUrlPath)) {
82 std::string path = 82 std::string path =
83 command_line->GetSwitchValueASCII(switches::kGaiaUrlPath); 83 command_line->GetSwitchValueASCII(switches::kGaiaUrlPath);
84 if (!path.empty()) { 84 if (!path.empty()) {
85 if (path[0] != '/') 85 if (path[0] != '/')
86 gaia_url_base.append("/"); 86 gaia_url_base.append("/");
87 87
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 const std::string& GaiaUrls::oauth2_issue_token_url() { 233 const std::string& GaiaUrls::oauth2_issue_token_url() {
234 return oauth2_issue_token_url_; 234 return oauth2_issue_token_url_;
235 } 235 }
236 236
237 237
238 const std::string& GaiaUrls::gaia_login_form_realm() { 238 const std::string& GaiaUrls::gaia_login_form_realm() {
239 return gaia_login_form_realm_; 239 return gaia_login_form_realm_;
240 } 240 }
OLDNEW
« chrome/chrome_tests.gypi ('K') | « chrome/test/data/chromeos/service_login.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698