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

Side by Side Diff: chrome/browser/policy/device_management_policy_provider.h

Issue 5026001: Rework the device management backend implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // specified in |storage_dir| is used to store the device token and persisted 63 // specified in |storage_dir| is used to store the device token and persisted
64 // policy, rather than the user's data directory. 64 // policy, rather than the user's data directory.
65 DeviceManagementPolicyProvider( 65 DeviceManagementPolicyProvider(
66 const PolicyDefinitionList* policy_list, 66 const PolicyDefinitionList* policy_list,
67 DeviceManagementBackend* backend, 67 DeviceManagementBackend* backend,
68 const FilePath& storage_dir); 68 const FilePath& storage_dir);
69 69
70 private: 70 private:
71 class InitializeAfterIOThreadExistsTask; 71 class InitializeAfterIOThreadExistsTask;
72 72
73 // Returns the device management backend to use for backend requests, lazily
74 // creating a new one if one doesn't already exist.
75 DeviceManagementBackend* GetBackend();
76
77 // Called by constructors to perform shared initialization. Initialization 73 // Called by constructors to perform shared initialization. Initialization
78 // requiring the IOThread must not be performed directly in this method, 74 // requiring the IOThread must not be performed directly in this method,
79 // rather must be deferred until the IOThread is fully initialized. This is 75 // rather must be deferred until the IOThread is fully initialized. This is
80 // the case in InitializeAfterIOThreadExists. 76 // the case in InitializeAfterIOThreadExists.
81 void Initialize(); 77 void Initialize();
82 78
83 // Called by a deferred task posted to the UI thread to complete the portion 79 // Called by a deferred task posted to the UI thread to complete the portion
84 // of initialization that requires the IOThread. 80 // of initialization that requires the IOThread.
85 void InitializeAfterIOThreadExists(); 81 void InitializeAfterIOThreadExists();
86 82
(...skipping 20 matching lines...) Expand all
107 NotificationRegistrar registrar_; 103 NotificationRegistrar registrar_;
108 FilePath storage_dir_; 104 FilePath storage_dir_;
109 bool policy_request_pending_; 105 bool policy_request_pending_;
110 106
111 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider); 107 DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProvider);
112 }; 108 };
113 109
114 } // namespace policy 110 } // namespace policy
115 111
116 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_ 112 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_POLICY_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698