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

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

Issue 12093036: Move Extension Location and Type enums to Manifest, and move InstallWarning to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/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 fcd75dcf1e51fb35f353f956a88626399e814bb0..a87072f5b8234f5869058ab3b96fd5eaea6d2eff 100644
--- a/chrome/browser/extensions/api/alarms/alarms_api.cc
+++ b/chrome/browser/extensions/api/alarms/alarms_api.cc
@@ -52,7 +52,7 @@ bool ValidateAlarmCreateInfo(const std::string& alarm_name,
if (create_info.delay_in_minutes.get()) {
if (*create_info.delay_in_minutes < kReleaseDelayMinimum) {
COMPILE_ASSERT(kReleaseDelayMinimum == 1, update_warning_message_below);
- if (extension->location() == Extension::LOAD)
+ if (extension->location() == Manifest::LOAD)
warnings->push_back(ErrorUtils::FormatErrorMessage(
"Alarm delay is less than minimum of 1 minutes."
" In released .crx, alarm \"*\" will fire in approximately"
@@ -68,7 +68,7 @@ bool ValidateAlarmCreateInfo(const std::string& alarm_name,
if (create_info.period_in_minutes.get()) {
if (*create_info.period_in_minutes < kReleaseDelayMinimum) {
COMPILE_ASSERT(kReleaseDelayMinimum == 1, update_warning_message_below);
- if (extension->location() == Extension::LOAD)
+ if (extension->location() == Manifest::LOAD)
warnings->push_back(ErrorUtils::FormatErrorMessage(
"Alarm period is less than minimum of 1 minutes."
" In released .crx, alarm \"*\" will fire approximately"
@@ -108,7 +108,7 @@ bool AlarmsCreateFunction::RunImpl() {
Alarm alarm(alarm_name,
params->alarm_info,
base::TimeDelta::FromMinutes(
- GetExtension()->location() == Extension::LOAD ?
+ GetExtension()->location() == Manifest::LOAD ?
kDevDelayMinimum : kReleaseDelayMinimum),
now_);
ExtensionSystem::Get(profile())->alarm_manager()->AddAlarm(
« no previous file with comments | « chrome/browser/extensions/admin_policy_unittest.cc ('k') | chrome/browser/extensions/api/alarms/alarms_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698