Commit ae729326 authored by bauerb@chromium.org's avatar bauerb@chromium.org

Add a command line flag to specify the scope to use for the permission request API.

BUG=304309,372381

Review URL: https://codereview.chromium.org/475743002

Cr-Commit-Position: refs/heads/master@{#289656}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289656 0039d316-1c4b-4281-b951-d872f2087c98
parent d02945c3
......@@ -71,7 +71,13 @@ void PermissionRequestCreatorApiary::CreatePermissionRequest(
void PermissionRequestCreatorApiary::StartFetching() {
OAuth2TokenService::ScopeSet scopes;
scopes.insert(signin_wrapper_->GetSyncScopeToUse());
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kPermissionRequestApiScope)) {
scopes.insert(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kPermissionRequestApiScope));
} else {
scopes.insert(signin_wrapper_->GetSyncScopeToUse());
}
access_token_request_ = oauth2_token_service_->StartRequest(
signin_wrapper_->GetAccountIdToUse(), scopes, this);
}
......
......@@ -908,8 +908,13 @@ const char kPerformanceMonitorGathering[] = "performance-monitor-gathering";
// Development flag for permission request API. This flag is needed until
// the API is finalized.
// TODO(akuegel): Remove when this flag is not needed anymore.
const char kPermissionRequestApiUrl[] = "permission-request-api-url";
// TODO(bauerb): Remove when this flag is not needed anymore.
const char kPermissionRequestApiScope[] = "permission-request-api-scope";
// Development flag for permission request API. This flag is needed until
// the API is finalized.
// TODO(bauerb): Remove when this flag is not needed anymore.
const char kPermissionRequestApiUrl[] = "permission-request-api-url";
// Read previously recorded data from the cache. Only cached data is read.
// See kRecordMode.
......
......@@ -254,6 +254,7 @@ extern const char kPackExtension[];
extern const char kPackExtensionKey[];
extern const char kParentProfile[];
extern const char kPerformanceMonitorGathering[];
extern const char kPermissionRequestApiScope[];
extern const char kPermissionRequestApiUrl[];
extern const char kPlaybackMode[];
extern const char kPpapiFlashPath[];
......
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