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

Side by Side Diff: chrome/browser/lifetime/keep_alive_registry.h

Issue 1708343002: Add ScopedKeepAlive to c/b/lifetime (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address PS7 comments, replace strings by a struct ptr, chromeappdelegate ctor takes a boolean Created 4 years, 10 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_
6 #define CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_
7
8 #include <set>
9
10 #include "base/macros.h"
11 #include "base/memory/singleton.h"
12
13 struct KeepAliveOptions;
14
15 class KeepAliveRegistry {
16 public:
17 static KeepAliveRegistry* GetInstance();
18
19 void Register(const KeepAliveOptions* options);
20 void Unregister(const KeepAliveOptions* options);
21
22 private:
23 friend struct base::DefaultSingletonTraits<KeepAliveRegistry>;
24
25 KeepAliveRegistry();
26 ~KeepAliveRegistry();
27
28 std::multiset<const KeepAliveOptions*> registered_keep_alives_;
29
30 DISALLOW_COPY_AND_ASSIGN(KeepAliveRegistry);
31 };
32
33 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698