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

Side by Side Diff: extensions/browser/api/alarms/alarm_manager.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api/alarms/alarm_manager.h" 5 #include "extensions/browser/api/alarms/alarm_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/time/clock.h" 11 #include "base/time/clock.h"
12 #include "base/time/default_clock.h" 12 #include "base/time/default_clock.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "base/value_conversions.h" 14 #include "base/value_conversions.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "extensions/browser/event_router.h" 16 #include "extensions/browser/event_router.h"
17 #include "extensions/browser/extension_registry.h" 17 #include "extensions/browser/extension_registry.h"
18 #include "extensions/browser/extension_system.h" 18 #include "extensions/browser/extension_system.h"
19 #include "extensions/browser/state_store.h" 19 #include "extensions/browser/state_store.h"
20 #include "extensions/common/api/alarms.h" 20 #include "extensions/common/api/alarms.h"
21 21
22 namespace extensions { 22 namespace extensions {
23 23
24 namespace alarms = core_api::alarms; 24 namespace alarms = api::alarms;
25 25
26 namespace { 26 namespace {
27 27
28 // A list of alarms that this extension has set. 28 // A list of alarms that this extension has set.
29 const char kRegisteredAlarms[] = "alarms"; 29 const char kRegisteredAlarms[] = "alarms";
30 const char kAlarmGranularity[] = "granularity"; 30 const char kAlarmGranularity[] = "granularity";
31 31
32 // The minimum period between polling for alarms to run. 32 // The minimum period between polling for alarms to run.
33 const base::TimeDelta kDefaultMinPollPeriod() { 33 const base::TimeDelta kDefaultMinPollPeriod() {
34 return base::TimeDelta::FromDays(1); 34 return base::TimeDelta::FromDays(1);
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 if (create_info.period_in_minutes.get()) { 458 if (create_info.period_in_minutes.get()) {
459 js_alarm->period_in_minutes.reset( 459 js_alarm->period_in_minutes.reset(
460 new double(*create_info.period_in_minutes)); 460 new double(*create_info.period_in_minutes));
461 } 461 }
462 } 462 }
463 463
464 Alarm::~Alarm() { 464 Alarm::~Alarm() {
465 } 465 }
466 466
467 } // namespace extensions 467 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/alarms/alarm_manager.h ('k') | extensions/browser/api/alarms/alarms_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698