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

Unified Diff: chrome/browser/extensions/api/alarms/alarms_api.cc

Issue 205323002: Chrome Alarm Clear and ClearAll Updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/browser/extensions/api/alarms/alarms_api_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/alarms/alarms_api.cc
diff --git a/chrome/browser/extensions/api/alarms/alarms_api.cc b/chrome/browser/extensions/api/alarms/alarms_api.cc
index 7c0621498b44ee8703b638f26dd7560dbb00e2d1..16aff6994efa50c7c10fbda60d623acdb3a5655c 100644
--- a/chrome/browser/extensions/api/alarms/alarms_api.cc
+++ b/chrome/browser/extensions/api/alarms/alarms_api.cc
@@ -189,10 +189,8 @@ bool AlarmsClearFunction::RunImpl() {
}
void AlarmsClearFunction::Callback(const std::string& name, bool success) {
- if (!success)
- error_ = ErrorUtils::FormatErrorMessage(kAlarmNotFound, name);
-
- SendResponse(success);
+ SetResult(new base::FundamentalValue(success));
+ SendResponse(true);
}
bool AlarmsClearAllFunction::RunImpl() {
@@ -202,6 +200,7 @@ bool AlarmsClearAllFunction::RunImpl() {
}
void AlarmsClearAllFunction::Callback() {
+ SetResult(new base::FundamentalValue(true));
not at google - send to devlin 2014/03/20 10:52:21 seems more correct to set this to (num_alarms_clea
Matt Perry 2014/03/20 18:53:42 hmm.. I think generally removeAll() on the empty s
robliao 2014/03/20 19:01:05 There are two philosophies to take here: 1) We tre
Matt Perry 2014/03/20 21:07:00 Yeah, #1 makes more sense IMO. I think it should o
robliao 2014/03/20 21:20:30 We do a hard CHECK if that happens, so we should b
SendResponse(true);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/alarms/alarms_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698