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

Side by Side Diff: extensions/browser/api/alarms/alarms_api.h

Issue 2078103002: Make AlarmManager::Alarm non copyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 #ifndef EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_H_
6 #define EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_H_ 6 #define EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
11 11
12 namespace base { 12 namespace base {
13 class Clock; 13 class Clock;
14 } // namespace base 14 } // namespace base
15 15
16 namespace extensions { 16 namespace extensions {
17 struct Alarm; 17 struct Alarm;
18 typedef std::vector<Alarm> AlarmList; 18 typedef std::vector<std::unique_ptr<Alarm>> AlarmList;
Devlin 2016/06/18 01:50:19 nitty nit: update to using.
lazyboy 2016/06/18 02:42:11 Done.
19 19
20 class AlarmsCreateFunction : public AsyncExtensionFunction { 20 class AlarmsCreateFunction : public AsyncExtensionFunction {
21 public: 21 public:
22 AlarmsCreateFunction(); 22 AlarmsCreateFunction();
23 // Use |clock| instead of the default clock. Does not take ownership 23 // Use |clock| instead of the default clock. Does not take ownership
24 // of |clock|. Used for testing. 24 // of |clock|. Used for testing.
25 explicit AlarmsCreateFunction(base::Clock* clock); 25 explicit AlarmsCreateFunction(base::Clock* clock);
26 26
27 protected: 27 protected:
28 ~AlarmsCreateFunction() override; 28 ~AlarmsCreateFunction() override;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bool RunAsync() override; 84 bool RunAsync() override;
85 85
86 private: 86 private:
87 void Callback(); 87 void Callback();
88 DECLARE_EXTENSION_FUNCTION("alarms.clearAll", ALARMS_CLEARALL) 88 DECLARE_EXTENSION_FUNCTION("alarms.clearAll", ALARMS_CLEARALL)
89 }; 89 };
90 90
91 } // namespace extensions 91 } // namespace extensions
92 92
93 #endif // EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_H_ 93 #endif // EXTENSIONS_BROWSER_API_ALARMS_ALARMS_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698