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

Unified Diff: chrome/browser/extensions/extension_preference_api.cc

Issue 6987017: Made all enums of preferences api unix_hacker_style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 9 years, 7 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/extensions/api/extension_api.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_preference_api.cc
diff --git a/chrome/browser/extensions/extension_preference_api.cc b/chrome/browser/extensions/extension_preference_api.cc
index 2759c89548af020d4cb885930c071a519ef5f7a1..ae65a58ec40a63222adcd15141b560a92dcc3da3 100644
--- a/chrome/browser/extensions/extension_preference_api.cc
+++ b/chrome/browser/extensions/extension_preference_api.cc
@@ -29,10 +29,10 @@ struct PrefMappingEntry {
const char* permission;
};
-const char kNotControllable[] = "NotControllable";
-const char kControlledByOtherExtensions[] = "ControlledByOtherExtensions";
-const char kControllableByThisExtension[] = "ControllableByThisExtension";
-const char kControlledByThisExtension[] = "ControlledByThisExtension";
+const char kNotControllable[] = "not_controllable";
+const char kControlledByOtherExtensions[] = "controlled_by_other_extensions";
+const char kControllableByThisExtension[] = "controllable_by_this_extension";
+const char kControlledByThisExtension[] = "controlled_by_this_extension";
const char kIncognito[] = "incognito";
const char kIncognitoSpecific[] = "incognitoSpecific";
@@ -397,6 +397,12 @@ bool SetPreferenceFunction::RunImpl() {
return false;
}
+ if (scope == extension_prefs_scope::kIncognitoSessionOnly &&
+ !profile_->HasOffTheRecordProfile()) {
+ error_ = kIncognitoSessionOnlyErrorMessage;
+ return false;
+ }
+
std::string browser_pref;
std::string permission;
EXTENSION_FUNCTION_VALIDATE(
« no previous file with comments | « no previous file | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698