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

Unified Diff: chrome/browser/supervised_user/permission_request_creator_apiary.cc

Issue 475743002: Add a command line flag to specify the scope to use for the permission request API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/permission_request_creator_apiary.cc
diff --git a/chrome/browser/supervised_user/permission_request_creator_apiary.cc b/chrome/browser/supervised_user/permission_request_creator_apiary.cc
index 91f93fc553d1c80013ffb5c1c8005299bc1c85f0..ad2da90a3969ae62308daf32eaf8efee51407e56 100644
--- a/chrome/browser/supervised_user/permission_request_creator_apiary.cc
+++ b/chrome/browser/supervised_user/permission_request_creator_apiary.cc
@@ -71,7 +71,13 @@ void PermissionRequestCreatorApiary::CreatePermissionRequest(
void PermissionRequestCreatorApiary::StartFetching() {
OAuth2TokenService::ScopeSet scopes;
- scopes.insert(signin_wrapper_->GetSyncScopeToUse());
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kPermissionRequestApiScope)) {
Marc Treib 2014/08/14 11:23:31 nit: indent 4 more spaces
Bernhard Bauer 2014/08/14 12:17:06 Done.
+ 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);
}
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698