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

Unified Diff: chrome/browser/extensions/settings/settings_api.cc

Issue 10232004: Only apply extension throttling quota to sync, not local. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/settings/settings_api.cc
diff --git a/chrome/browser/extensions/settings/settings_api.cc b/chrome/browser/extensions/settings/settings_api.cc
index cfb749c82c07b49e98d8ff6c2f88e16753f662d0..c8a831fe7f321161510e605596fe580176adf752 100644
--- a/chrome/browser/extensions/settings/settings_api.cc
+++ b/chrome/browser/extensions/settings/settings_api.cc
@@ -28,6 +28,17 @@ SettingsFunction::SettingsFunction()
SettingsFunction::~SettingsFunction() {}
+bool SettingsFunction::ShouldSkipQuotaLimiting() const {
+ // Only apply quota if this is for sync storage.
+ std::string settings_namespace_string;
+ if (!args_->GetString(0, &settings_namespace_string)) {
+ // This is an error but it will be caught in RunImpl(), there is no
+ // mechanism to signify an error from this function.
+ return false;
+ }
+ return settings_namespace_string != "sync";
+}
+
bool SettingsFunction::RunImpl() {
{
std::string settings_namespace_string;

Powered by Google App Engine
This is Rietveld 408576698