Commit bd82b02d authored by elvin@google.com's avatar elvin@google.com

Switch end points to point to production and make channel API a flag

Review URL: http://codereview.chromium.org/8633024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111308 0039d316-1c4b-4281-b951-d872f2087c98
parent 69030f44
......@@ -38,7 +38,7 @@ static const char kChannelSetupCanceledByUser[] = "canceled_by_user";
static const char kAuthorizationHeaderFormat[] =
"Authorization: GoogleLogin auth=%s";
static const char kOAuth2IssueTokenURL[] =
"https://www-googleapis-staging.sandbox.google.com/oauth2/v2/IssueToken";
"https://www.googleapis.com/oauth2/v2/IssueToken";
static const char kOAuth2IssueTokenBodyFormat[] =
"force=true"
"&response_type=token"
......@@ -48,8 +48,8 @@ static const char kOAuth2IssueTokenBodyFormat[] =
static const char kOAuth2IssueTokenScope[] =
"https://www.googleapis.com/auth/chromewebstore.notification";
static const char kCWSChannelServiceURL[] =
"https://www-googleapis-staging.sandbox.google.com/chromewebstore/"
"v1internal/channels/app_id/oauth_client_id";
"https://www.googleapis.com/chromewebstore/"
"v1.1/channels/id";
static const char* kRelevantGaiaServices[] = {
GaiaConstants::kCWSService,
GaiaConstants::kLSOService,
......@@ -325,6 +325,18 @@ void AppNotifyChannelSetup::ReportResult(
// static
GURL AppNotifyChannelSetup::GetCWSChannelServiceURL() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kAppNotifyChannelServerURL)) {
std::string switch_value = command_line->GetSwitchValueASCII(
switches::kAppNotifyChannelServerURL);
GURL result(switch_value);
if (result.is_valid()) {
return result;
} else {
LOG(ERROR) << "Invalid value for " <<
switches::kAppNotifyChannelServerURL;
}
}
return GURL(kCWSChannelServiceURL);
}
......
......@@ -60,6 +60,10 @@ const char kApp[] = "app";
// according to its configuration.
const char kAppId[] = "app-id";
// A URL for the server which assigns channel ids for server pushed app
// notifications.
const char kAppNotifyChannelServerURL[] = "app-notify-channel-server-url";
// Overrides the apps checkout URL, which is used to determine when to expose
// some private APIs.
const char kAppsCheckoutURL[] = "apps-checkout-url";
......
......@@ -34,6 +34,7 @@ extern const char kAllowWebUICompositing[];
extern const char kAlwaysAuthorizePlugins[];
extern const char kAppId[];
extern const char kApp[];
extern const char kAppNotifyChannelServerURL[];
extern const char kAppsCheckoutURL[];
extern const char kAppsGalleryReturnTokens[];
extern const char kAppsGalleryURL[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment