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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc

Issue 2782553004: Move TestingPrefService to use unique_ptr<Value> (Closed)
Patch Set: comments Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/signin/easy_unlock_service.h" 5 #include "chrome/browser/signin/easy_unlock_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 SetUpProfile(&profile_, AccountId::FromUserEmailGaiaId( 228 SetUpProfile(&profile_, AccountId::FromUserEmailGaiaId(
229 kTestUserPrimary, kPrimaryGaiaId)); 229 kTestUserPrimary, kPrimaryGaiaId));
230 } 230 }
231 231
232 void TearDown() override { 232 void TearDown() override {
233 delete app_manager_factory; 233 delete app_manager_factory;
234 app_manager_factory = NULL; 234 app_manager_factory = NULL;
235 } 235 }
236 236
237 void SetEasyUnlockAllowedPolicy(bool allowed) { 237 void SetEasyUnlockAllowedPolicy(bool allowed) {
238 profile_->GetTestingPrefService()->SetManagedPref(prefs::kEasyUnlockAllowed, 238 profile_->GetTestingPrefService()->SetManagedPref(
239 new base::Value(allowed)); 239 prefs::kEasyUnlockAllowed, base::MakeUnique<base::Value>(allowed));
240 } 240 }
241 241
242 void set_is_bluetooth_adapter_present(bool is_present) { 242 void set_is_bluetooth_adapter_present(bool is_present) {
243 is_bluetooth_adapter_present_ = is_present; 243 is_bluetooth_adapter_present_ = is_present;
244 } 244 }
245 245
246 bool is_bluetooth_adapter_present() const { 246 bool is_bluetooth_adapter_present() const {
247 return is_bluetooth_adapter_present_; 247 return is_bluetooth_adapter_present_;
248 } 248 }
249 249
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserPrimary, kPrimaryGaiaId), 386 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserPrimary, kPrimaryGaiaId),
387 EasyUnlockService::Get(profile_.get())->GetAccountId()); 387 EasyUnlockService::Get(profile_.get())->GetAccountId());
388 388
389 SetUpSecondaryProfile(); 389 SetUpSecondaryProfile();
390 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserSecondary, 390 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserSecondary,
391 kSecondaryGaiaId), 391 kSecondaryGaiaId),
392 EasyUnlockService::Get(secondary_profile_.get())->GetAccountId()); 392 EasyUnlockService::Get(secondary_profile_.get())->GetAccountId());
393 } 393 }
394 394
395 } // namespace 395 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service_unittest.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698