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

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

Issue 258793006: Suppress Errors for chrome.alarm.get (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« 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 16aff6994efa50c7c10fbda60d623acdb3a5655c..6c717cb51ff2340c04a46faca2567fdf4622f352 100644
--- a/chrome/browser/extensions/api/alarms/alarms_api.cc
+++ b/chrome/browser/extensions/api/alarms/alarms_api.cc
@@ -19,7 +19,6 @@ namespace extensions {
namespace {
const char kDefaultAlarmName[] = "";
-const char kAlarmNotFound[] = "No alarm named '*' exists.";
const char kBothRelativeAndAbsoluteTime[] =
"Cannot set both when and delayInMinutes.";
const char kNoScheduledTime[] =
@@ -147,11 +146,8 @@ void AlarmsGetFunction::Callback(
const std::string& name, extensions::Alarm* alarm) {
if (alarm) {
results_ = alarms::Get::Results::Create(*alarm->js_alarm);
- SendResponse(true);
- } else {
- error_ = ErrorUtils::FormatErrorMessage(kAlarmNotFound, name);
- SendResponse(false);
}
+ SendResponse(true);
}
bool AlarmsGetAllFunction::RunImpl() {
« 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