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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_client.h

Issue 2728463004: Remove enterprise serial number recovery feature (Closed)
Patch Set: Removed access to removed fied in policy_testserver.py. Created 3 years, 7 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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 // Adds an observer to be called back upon policy and state changes. 197 // Adds an observer to be called back upon policy and state changes.
198 void AddObserver(Observer* observer); 198 void AddObserver(Observer* observer);
199 199
200 // Removes the specified observer. 200 // Removes the specified observer.
201 void RemoveObserver(Observer* observer); 201 void RemoveObserver(Observer* observer);
202 202
203 const std::string& machine_id() const { return machine_id_; } 203 const std::string& machine_id() const { return machine_id_; }
204 const std::string& machine_model() const { return machine_model_; } 204 const std::string& machine_model() const { return machine_model_; }
205 205
206 void set_submit_machine_id(bool submit_machine_id) {
207 submit_machine_id_ = submit_machine_id;
208 }
209
210 void set_last_policy_timestamp(const base::Time& timestamp) { 206 void set_last_policy_timestamp(const base::Time& timestamp) {
211 last_policy_timestamp_ = timestamp; 207 last_policy_timestamp_ = timestamp;
212 } 208 }
213 209
214 void set_public_key_version(int public_key_version) { 210 void set_public_key_version(int public_key_version) {
215 public_key_version_ = public_key_version; 211 public_key_version_ = public_key_version;
216 public_key_version_valid_ = true; 212 public_key_version_valid_ = true;
217 } 213 }
218 214
219 void clear_public_key_version() { 215 void clear_public_key_version() {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 std::vector<std::string> state_keys_to_upload_; 374 std::vector<std::string> state_keys_to_upload_;
379 375
380 std::string dm_token_; 376 std::string dm_token_;
381 DeviceMode device_mode_ = DEVICE_MODE_NOT_SET; 377 DeviceMode device_mode_ = DEVICE_MODE_NOT_SET;
382 std::string client_id_; 378 std::string client_id_;
383 base::Time last_policy_timestamp_; 379 base::Time last_policy_timestamp_;
384 int public_key_version_ = -1; 380 int public_key_version_ = -1;
385 bool public_key_version_valid_ = false; 381 bool public_key_version_valid_ = false;
386 std::string robot_api_auth_code_; 382 std::string robot_api_auth_code_;
387 383
388 // Whether to send |machine_id_| as part of policy fetch.
389 bool submit_machine_id_ = false;
390
391 // Information for the latest policy invalidation received. 384 // Information for the latest policy invalidation received.
392 int64_t invalidation_version_ = 0; 385 int64_t invalidation_version_ = 0;
393 std::string invalidation_payload_; 386 std::string invalidation_payload_;
394 387
395 // The invalidation version used for the most recent fetch operation. 388 // The invalidation version used for the most recent fetch operation.
396 int64_t fetched_invalidation_version_ = 0; 389 int64_t fetched_invalidation_version_ = 0;
397 390
398 // Used for issuing requests to the cloud. 391 // Used for issuing requests to the cloud.
399 DeviceManagementService* service_ = nullptr; 392 DeviceManagementService* service_ = nullptr;
400 393
(...skipping 20 matching lines...) Expand all
421 414
422 // Used to create tasks which run delayed on the UI thread. 415 // Used to create tasks which run delayed on the UI thread.
423 base::WeakPtrFactory<CloudPolicyClient> weak_ptr_factory_; 416 base::WeakPtrFactory<CloudPolicyClient> weak_ptr_factory_;
424 417
425 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient); 418 DISALLOW_COPY_AND_ASSIGN(CloudPolicyClient);
426 }; 419 };
427 420
428 } // namespace policy 421 } // namespace policy
429 422
430 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_ 423 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_CLOUD_POLICY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698