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

Unified Diff: chrome/browser/bookmarks/bookmark_manager_extension_api.cc

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Synced. Created 8 years, 5 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/bookmarks/bookmark_manager_extension_api.cc
diff --git a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
index 4679096644c041f6a3b14c3ad7af4a9429e51431..4b07946df6d223cb9e5ea23f45e7841b6866d43a 100644
--- a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
+++ b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
@@ -280,7 +280,7 @@ bool CanPasteBookmarkManagerFunction::RunImpl() {
return false;
}
bool can_paste = bookmark_utils::CanPasteFromClipboard(parent_node);
- result_.reset(Value::CreateBooleanValue(can_paste));
+ SetResult(Value::CreateBooleanValue(can_paste));
return true;
}
@@ -371,7 +371,7 @@ bool BookmarkManagerGetStringsFunction::RunImpl() {
ChromeURLDataManager::DataSource::SetFontAndTextDirection(localized_strings);
- result_.reset(localized_strings);
+ SetResult(localized_strings);
// This is needed because unlike the rest of these functions, this class
// inherits from AsyncFunction directly, rather than BookmarkFunction.
@@ -490,12 +490,12 @@ bool GetSubtreeBookmarkManagerFunction::RunImpl() {
} else {
bookmark_extension_helpers::AddNode(node, json.get(), true);
}
- result_.reset(json.release());
+ SetResult(json.release());
return true;
}
bool CanEditBookmarkManagerFunction::RunImpl() {
- result_.reset(Value::CreateBooleanValue(
+ SetResult(Value::CreateBooleanValue(
profile_->GetPrefs()->GetBoolean(prefs::kEditBookmarksEnabled)));
return true;
}
@@ -513,6 +513,6 @@ bool CanOpenNewWindowsBookmarkFunction::RunImpl() {
can_open_new_windows = false;
#endif // OS_WIN
- result_.reset(Value::CreateBooleanValue(can_open_new_windows));
+ SetResult(Value::CreateBooleanValue(can_open_new_windows));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698