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

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

Issue 10628008: If there is a device id use that instead of a new one for re-enrolling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 CHROME_BROWSER_POLICY_CLOUD_POLICY_DATA_STORE_H_ 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_DATA_STORE_H_
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_DATA_STORE_H_ 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_DATA_STORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool token_cache_loaded); 71 bool token_cache_loaded);
72 72
73 void set_device_id(const std::string& device_id); 73 void set_device_id(const std::string& device_id);
74 void set_machine_id(const std::string& machine_id); 74 void set_machine_id(const std::string& machine_id);
75 void set_machine_model(const std::string& machine_model); 75 void set_machine_model(const std::string& machine_model);
76 void set_user_name(const std::string& user_name); 76 void set_user_name(const std::string& user_name);
77 void set_user_affiliation(UserAffiliation user_affiliation); 77 void set_user_affiliation(UserAffiliation user_affiliation);
78 void set_known_machine_id(bool known_machine_id); 78 void set_known_machine_id(bool known_machine_id);
79 void set_policy_fetching_enabled(bool policy_fetching_enabled); 79 void set_policy_fetching_enabled(bool policy_fetching_enabled);
80 void set_device_mode(DeviceMode device_mode); 80 void set_device_mode(DeviceMode device_mode);
81 void set_reregister(bool reregister);
81 82
82 #if defined(OS_CHROMEOS) 83 #if defined(OS_CHROMEOS)
83 void set_device_status_collector(DeviceStatusCollector* collector); 84 void set_device_status_collector(DeviceStatusCollector* collector);
84 DeviceStatusCollector* device_status_collector(); 85 DeviceStatusCollector* device_status_collector();
85 #endif 86 #endif
86 87
87 const std::string& device_id() const; 88 const std::string& device_id() const;
88 const std::string& device_token() const; 89 const std::string& device_token() const;
89 const std::string& gaia_token() const; 90 const std::string& gaia_token() const;
90 const std::string& oauth_token() const; 91 const std::string& oauth_token() const;
91 bool has_auth_token() const; 92 bool has_auth_token() const;
92 const std::string& machine_id() const; 93 const std::string& machine_id() const;
93 const std::string& machine_model() const; 94 const std::string& machine_model() const;
94 enterprise_management::DeviceRegisterRequest_Type 95 enterprise_management::DeviceRegisterRequest_Type
95 policy_register_type() const; 96 policy_register_type() const;
96 const std::string& policy_type() const; 97 const std::string& policy_type() const;
97 bool token_cache_loaded() const; 98 bool token_cache_loaded() const;
98 bool policy_fetching_enabled() const; 99 bool policy_fetching_enabled() const;
99 const std::string& user_name() const; 100 const std::string& user_name() const;
100 UserAffiliation user_affiliation() const; 101 UserAffiliation user_affiliation() const;
101 bool known_machine_id() const; 102 bool known_machine_id() const;
102 DeviceMode device_mode() const; 103 DeviceMode device_mode() const;
104 bool reregister() const;
103 105
104 void AddObserver(Observer* observer); 106 void AddObserver(Observer* observer);
105 void RemoveObserver(Observer* observer); 107 void RemoveObserver(Observer* observer);
106 108
107 void NotifyCredentialsChanged(); 109 void NotifyCredentialsChanged();
108 void NotifyDeviceTokenChanged(); 110 void NotifyDeviceTokenChanged();
109 111
110 private: 112 private:
111 CloudPolicyDataStore( 113 CloudPolicyDataStore(
112 const enterprise_management::DeviceRegisterRequest_Type register_type, 114 const enterprise_management::DeviceRegisterRequest_Type register_type,
(...skipping 11 matching lines...) Expand all
124 // Constants that won't change over the life-time of a cloud policy 126 // Constants that won't change over the life-time of a cloud policy
125 // subsystem. 127 // subsystem.
126 const enterprise_management::DeviceRegisterRequest_Type policy_register_type_; 128 const enterprise_management::DeviceRegisterRequest_Type policy_register_type_;
127 const std::string policy_type_; 129 const std::string policy_type_;
128 130
129 // Data used for constructiong both register and policy requests. 131 // Data used for constructiong both register and policy requests.
130 std::string device_id_; 132 std::string device_id_;
131 std::string machine_model_; 133 std::string machine_model_;
132 std::string machine_id_; 134 std::string machine_id_;
133 bool known_machine_id_; 135 bool known_machine_id_;
136 bool reregister_;
134 137
135 bool token_cache_loaded_; 138 bool token_cache_loaded_;
136 bool policy_fetching_enabled_; 139 bool policy_fetching_enabled_;
137 140
138 DeviceMode device_mode_; 141 DeviceMode device_mode_;
139 142
140 #if defined(OS_CHROMEOS) 143 #if defined(OS_CHROMEOS)
141 scoped_ptr<DeviceStatusCollector> device_status_collector_; 144 scoped_ptr<DeviceStatusCollector> device_status_collector_;
142 #endif 145 #endif
143 146
144 ObserverList<Observer, true> observer_list_; 147 ObserverList<Observer, true> observer_list_;
145 148
146 DISALLOW_COPY_AND_ASSIGN(CloudPolicyDataStore); 149 DISALLOW_COPY_AND_ASSIGN(CloudPolicyDataStore);
147 }; 150 };
148 151
149 } // namespace policy 152 } // namespace policy
150 153
151 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_DATA_STORE_H_ 154 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_DATA_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_controller.cc ('k') | chrome/browser/policy/cloud_policy_data_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698