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

Unified Diff: extensions/browser/api/storage/storage_api.cc

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix test Created 6 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: extensions/browser/api/storage/storage_api.cc
diff --git a/extensions/browser/api/storage/storage_api.cc b/extensions/browser/api/storage/storage_api.cc
index 3f1882d066da2e619fda92ccec54d43fcc6977d1..15967e1869efc39267dcacaf2f4c8dab8a518bdd 100644
--- a/extensions/browser/api/storage/storage_api.cc
+++ b/extensions/browser/api/storage/storage_api.cc
@@ -32,14 +32,13 @@ bool SettingsFunction::ShouldSkipQuotaLimiting() const {
std::string settings_namespace_string;
if (!args_->GetString(0, &settings_namespace_string)) {
// This should be EXTENSION_FUNCTION_VALIDATE(false) but there is no way
- // to signify that from this function. It will be caught in
- // RunImplTypesafe().
+ // to signify that from this function. It will be caught in Run().
return false;
}
return settings_namespace_string != "sync";
}
-ExtensionFunction::ResponseAction SettingsFunction::RunImplTypesafe() {
+ExtensionFunction::ResponseAction SettingsFunction::Run() {
std::string settings_namespace_string;
EXTENSION_FUNCTION_VALIDATE_TYPESAFE(
args_->GetString(0, &settings_namespace_string));
@@ -66,11 +65,10 @@ ExtensionFunction::ResponseAction SettingsFunction::RunImplTypesafe() {
void SettingsFunction::AsyncRunWithStorage(ValueStore* storage) {
ResponseValue response = RunWithStorage(storage);
- BrowserThread::PostTask(BrowserThread::UI,
- FROM_HERE,
- base::Bind(&SettingsFunction::SendResponseTypesafe,
- this,
- base::Passed(&response)));
+ BrowserThread::PostTask(
+ BrowserThread::UI,
+ FROM_HERE,
+ base::Bind(&SettingsFunction::Done, this, base::Passed(&response)));
}
ExtensionFunction::ResponseValue SettingsFunction::UseReadResult(

Powered by Google App Engine
This is Rietveld 408576698