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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "chrome/browser/chromeos/settings/device_settings_service.h" 15 #include "chrome/browser/chromeos/settings/device_settings_service.h"
16 #include "components/policy/core/common/cloud/cloud_policy_validator.h" 16 #include "components/policy/core/common/cloud/cloud_policy_validator.h"
17 #include "components/policy/core/common/cloud/user_cloud_policy_store_base.h" 17 #include "components/policy/core/common/cloud/user_cloud_policy_store_base.h"
18 18
19 namespace base { 19 namespace base {
20 class SequencedTaskRunner; 20 class SequencedTaskRunner;
21 } 21 }
22 22
23 namespace chromeos { 23 namespace chromeos {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Sends the policy blob to session_manager for storing after validation. 62 // Sends the policy blob to session_manager for storing after validation.
63 void StoreValidatedPolicy(UserCloudPolicyValidator* validator); 63 void StoreValidatedPolicy(UserCloudPolicyValidator* validator);
64 64
65 // Called back when a store operation completes, updates state and reloads the 65 // Called back when a store operation completes, updates state and reloads the
66 // policy if applicable. 66 // policy if applicable.
67 void HandleStoreResult(bool result); 67 void HandleStoreResult(bool result);
68 68
69 // Gets the owner key and triggers policy validation. 69 // Gets the owner key and triggers policy validation.
70 void CheckKeyAndValidate( 70 void CheckKeyAndValidate(
71 bool valid_timestamp_required, 71 bool valid_timestamp_required,
72 scoped_ptr<enterprise_management::PolicyFetchResponse> policy, 72 std::unique_ptr<enterprise_management::PolicyFetchResponse> policy,
73 const UserCloudPolicyValidator::CompletionCallback& callback); 73 const UserCloudPolicyValidator::CompletionCallback& callback);
74 74
75 // Triggers policy validation. 75 // Triggers policy validation.
76 void Validate( 76 void Validate(
77 bool valid_timestamp_required, 77 bool valid_timestamp_required,
78 scoped_ptr<enterprise_management::PolicyFetchResponse> policy, 78 std::unique_ptr<enterprise_management::PolicyFetchResponse> policy,
79 const UserCloudPolicyValidator::CompletionCallback& callback, 79 const UserCloudPolicyValidator::CompletionCallback& callback,
80 chromeos::DeviceSettingsService::OwnershipStatus ownership_status); 80 chromeos::DeviceSettingsService::OwnershipStatus ownership_status);
81 81
82 const std::string account_id_; 82 const std::string account_id_;
83 chromeos::SessionManagerClient* session_manager_client_; 83 chromeos::SessionManagerClient* session_manager_client_;
84 chromeos::DeviceSettingsService* device_settings_service_; 84 chromeos::DeviceSettingsService* device_settings_service_;
85 85
86 scoped_refptr<base::SequencedTaskRunner> background_task_runner_; 86 scoped_refptr<base::SequencedTaskRunner> background_task_runner_;
87 87
88 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_; 88 base::WeakPtrFactory<DeviceLocalAccountPolicyStore> weak_factory_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore); 90 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountPolicyStore);
91 }; 91 };
92 92
93 } // namespace policy 93 } // namespace policy
94 94
95 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_ 95 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_POLICY_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698