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

Side by Side Diff: chrome/browser/ui/app_list/arc/arc_app_unittest.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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 return false; 512 return false;
513 } 513 }
514 } 514 }
515 515
516 // ArcPlayStoreAppTest: 516 // ArcPlayStoreAppTest:
517 void OnBeforeArcTestSetup() override { 517 void OnBeforeArcTestSetup() override {
518 policy::ProfilePolicyConnector* const connector = 518 policy::ProfilePolicyConnector* const connector =
519 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile()); 519 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile());
520 connector->OverrideIsManagedForTesting(true); 520 connector->OverrideIsManagedForTesting(true);
521 profile()->GetTestingPrefService()->SetManagedPref( 521 profile()->GetTestingPrefService()->SetManagedPref(
522 prefs::kArcEnabled, new base::Value(IsEnabledByPolicy())); 522 prefs::kArcEnabled, base::MakeUnique<base::Value>(IsEnabledByPolicy()));
523 523
524 ArcPlayStoreAppTest::OnBeforeArcTestSetup(); 524 ArcPlayStoreAppTest::OnBeforeArcTestSetup();
525 } 525 }
526 526
527 private: 527 private:
528 DISALLOW_COPY_AND_ASSIGN(ArcDefaulAppForManagedUserTest); 528 DISALLOW_COPY_AND_ASSIGN(ArcDefaulAppForManagedUserTest);
529 }; 529 };
530 530
531 class ArcAppModelBuilderRecreate : public ArcAppModelBuilderTest { 531 class ArcAppModelBuilderRecreate : public ArcAppModelBuilderTest {
532 public: 532 public:
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 ::testing::ValuesIn(kUnmanagedArcStates)); 1580 ::testing::ValuesIn(kUnmanagedArcStates));
1581 INSTANTIATE_TEST_CASE_P(, 1581 INSTANTIATE_TEST_CASE_P(,
1582 ArcDefaulAppForManagedUserTest, 1582 ArcDefaulAppForManagedUserTest,
1583 ::testing::ValuesIn(kManagedArcStates)); 1583 ::testing::ValuesIn(kManagedArcStates));
1584 INSTANTIATE_TEST_CASE_P(, 1584 INSTANTIATE_TEST_CASE_P(,
1585 ArcPlayStoreAppTest, 1585 ArcPlayStoreAppTest,
1586 ::testing::ValuesIn(kUnmanagedArcStates)); 1586 ::testing::ValuesIn(kUnmanagedArcStates));
1587 INSTANTIATE_TEST_CASE_P(, 1587 INSTANTIATE_TEST_CASE_P(,
1588 ArcAppModelBuilderRecreate, 1588 ArcAppModelBuilderRecreate,
1589 ::testing::ValuesIn(kUnmanagedArcStates)); 1589 ::testing::ValuesIn(kUnmanagedArcStates));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698