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

Side by Side Diff: chrome/browser/chromeos/policy/server_backed_state_keys_broker.h

Issue 465413002: Minor cleanup of EnrollmentHandlerChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation for AMD64 Chromium OS. Created 6 years, 3 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
« no previous file with comments | « chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_POLICY_SERVER_BACKED_STATE_KEYS_BROKER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_SERVER_BACKED_STATE_KEYS_BROKER_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_SERVER_BACKED_STATE_KEYS_BROKER_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_SERVER_BACKED_STATE_KEYS_BROKER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/callback_list.h" 12 #include "base/callback_list.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 16
17 namespace base { 17 namespace base {
18 class TaskRunner; 18 class TaskRunner;
19 } 19 }
20 20
21 namespace chromeos { 21 namespace chromeos {
22 class SessionManagerClient; 22 class SessionManagerClient;
23 } 23 }
24 24
25 namespace policy { 25 namespace policy {
26 26
27 // Brokers server-backed state keys for the device. Retrieves them from session 27 // Brokers server-backed FRE state keys for the device. Retrieves them from
28 // manager via DBus and refreshes them periodically. Consumers can register 28 // session manager via DBus and refreshes them periodically. Consumers can
29 // callbacks to invoke when the state keys change. 29 // register callbacks to invoke when the state keys change.
30 class ServerBackedStateKeysBroker { 30 class ServerBackedStateKeysBroker {
31 public: 31 public:
32 typedef scoped_ptr<base::CallbackList<void()>::Subscription> Subscription; 32 typedef scoped_ptr<base::CallbackList<void()>::Subscription> Subscription;
33 typedef base::Callback<void(const std::vector<std::string>&, bool)> 33 typedef base::Callback<void(const std::vector<std::string>&, bool)>
34 StateKeysCallback; 34 StateKeysCallback;
35 35
36 ServerBackedStateKeysBroker( 36 ServerBackedStateKeysBroker(
37 chromeos::SessionManagerClient* session_manager_client, 37 chromeos::SessionManagerClient* session_manager_client,
38 scoped_refptr<base::TaskRunner> delayed_task_runner); 38 scoped_refptr<base::TaskRunner> delayed_task_runner);
39 ~ServerBackedStateKeysBroker(); 39 ~ServerBackedStateKeysBroker();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 std::vector<StateKeysCallback> request_callbacks_; 97 std::vector<StateKeysCallback> request_callbacks_;
98 98
99 base::WeakPtrFactory<ServerBackedStateKeysBroker> weak_factory_; 99 base::WeakPtrFactory<ServerBackedStateKeysBroker> weak_factory_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(ServerBackedStateKeysBroker); 101 DISALLOW_COPY_AND_ASSIGN(ServerBackedStateKeysBroker);
102 }; 102 };
103 103
104 } // namespace policy 104 } // namespace policy
105 105
106 #endif // CHROME_BROWSER_CHROMEOS_POLICY_SERVER_BACKED_STATE_KEYS_BROKER_H_ 106 #endif // CHROME_BROWSER_CHROMEOS_POLICY_SERVER_BACKED_STATE_KEYS_BROKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698