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

Side by Side Diff: chrome/browser/chromeos/login/supervised/supervised_user_test_base.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 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_ 4 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_
5 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_ 5 #define CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 18 matching lines...) Expand all
29 const char kTestManagerPassword[] = "password"; 29 const char kTestManagerPassword[] = "password";
30 const char kTestSupervisedUserDisplayName[] = "John Doe"; 30 const char kTestSupervisedUserDisplayName[] = "John Doe";
31 const char kTestSupervisedUserPassword[] = "simplepassword"; 31 const char kTestSupervisedUserPassword[] = "simplepassword";
32 32
33 class SupervisedUsersSyncTestAdapter { 33 class SupervisedUsersSyncTestAdapter {
34 public: 34 public:
35 explicit SupervisedUsersSyncTestAdapter(Profile* profile); 35 explicit SupervisedUsersSyncTestAdapter(Profile* profile);
36 36
37 bool HasChanges() { return !processor_->changes().empty(); } 37 bool HasChanges() { return !processor_->changes().empty(); }
38 38
39 scoped_ptr< ::sync_pb::ManagedUserSpecifics> GetFirstChange(); 39 std::unique_ptr<::sync_pb::ManagedUserSpecifics> GetFirstChange();
40 40
41 void AddChange(const ::sync_pb::ManagedUserSpecifics& proto, bool update); 41 void AddChange(const ::sync_pb::ManagedUserSpecifics& proto, bool update);
42 42
43 syncer::FakeSyncChangeProcessor* processor_; 43 syncer::FakeSyncChangeProcessor* processor_;
44 SupervisedUserSyncService* service_; 44 SupervisedUserSyncService* service_;
45 int next_sync_data_id_; 45 int next_sync_data_id_;
46 }; 46 };
47 47
48 class SupervisedUsersSharedSettingsSyncTestAdapter { 48 class SupervisedUsersSharedSettingsSyncTestAdapter {
49 public: 49 public:
50 explicit SupervisedUsersSharedSettingsSyncTestAdapter(Profile* profile); 50 explicit SupervisedUsersSharedSettingsSyncTestAdapter(Profile* profile);
51 51
52 bool HasChanges() { return !processor_->changes().empty(); } 52 bool HasChanges() { return !processor_->changes().empty(); }
53 53
54 scoped_ptr< ::sync_pb::ManagedUserSharedSettingSpecifics> GetFirstChange(); 54 std::unique_ptr<::sync_pb::ManagedUserSharedSettingSpecifics>
55 GetFirstChange();
55 56
56 void AddChange(const ::sync_pb::ManagedUserSharedSettingSpecifics& proto, 57 void AddChange(const ::sync_pb::ManagedUserSharedSettingSpecifics& proto,
57 bool update); 58 bool update);
58 59
59 void AddChange(const std::string& mu_id, 60 void AddChange(const std::string& mu_id,
60 const std::string& key, 61 const std::string& key,
61 const base::Value& value, 62 const base::Value& value,
62 bool acknowledged, 63 bool acknowledged,
63 bool update); 64 bool update);
64 65
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const std::string& expected_display_name); 98 const std::string& expected_display_name);
98 void SigninAsManager(int user_index); 99 void SigninAsManager(int user_index);
99 void RemoveSupervisedUser(size_t original_user_count, 100 void RemoveSupervisedUser(size_t original_user_count,
100 int user_index, 101 int user_index,
101 const std::string& expected_display_name); 102 const std::string& expected_display_name);
102 103
103 cryptohome::MockAsyncMethodCaller* mock_async_method_caller_; 104 cryptohome::MockAsyncMethodCaller* mock_async_method_caller_;
104 cryptohome::MockHomedirMethods* mock_homedir_methods_; 105 cryptohome::MockHomedirMethods* mock_homedir_methods_;
105 NetworkPortalDetectorTestImpl* network_portal_detector_; 106 NetworkPortalDetectorTestImpl* network_portal_detector_;
106 SupervisedUserRegistrationUtilityStub* registration_utility_stub_; 107 SupervisedUserRegistrationUtilityStub* registration_utility_stub_;
107 scoped_ptr<ScopedTestingSupervisedUserRegistrationUtility> scoped_utility_; 108 std::unique_ptr<ScopedTestingSupervisedUserRegistrationUtility>
108 scoped_ptr<SupervisedUsersSharedSettingsSyncTestAdapter> 109 scoped_utility_;
110 std::unique_ptr<SupervisedUsersSharedSettingsSyncTestAdapter>
109 shared_settings_adapter_; 111 shared_settings_adapter_;
110 scoped_ptr<SupervisedUsersSyncTestAdapter> supervised_users_adapter_; 112 std::unique_ptr<SupervisedUsersSyncTestAdapter> supervised_users_adapter_;
111 113
112 private: 114 private:
113 DISALLOW_COPY_AND_ASSIGN(SupervisedUserTestBase); 115 DISALLOW_COPY_AND_ASSIGN(SupervisedUserTestBase);
114 }; 116 };
115 117
116 } // namespace chromeos 118 } // namespace chromeos
117 119
118 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_ 120 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SUPERVISED_SUPERVISED_USER_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698