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

Side by Side Diff: chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc

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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/policy/recommendation_restorer.h" 5 #include "chrome/browser/chromeos/policy/recommendation_restorer.h"
6 6
7 #include <memory>
7 #include <utility> 8 #include <utility>
8 9
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/test/test_simple_task_runner.h" 12 #include "base/test/test_simple_task_runner.h"
13 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/chromeos/policy/recommendation_restorer_factory.h" 17 #include "chrome/browser/chromeos/policy/recommendation_restorer_factory.h"
18 #include "chrome/browser/prefs/browser_prefs.h" 18 #include "chrome/browser/prefs/browser_prefs.h"
19 #include "chrome/common/chrome_constants.h" 19 #include "chrome/common/chrome_constants.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void VerifyTimerIsRunning() const; 70 void VerifyTimerIsRunning() const;
71 71
72 TestingPrefStore* recommended_prefs_; // Not owned. 72 TestingPrefStore* recommended_prefs_; // Not owned.
73 syncable_prefs::TestingPrefServiceSyncable* prefs_; // Not owned. 73 syncable_prefs::TestingPrefServiceSyncable* prefs_; // Not owned.
74 RecommendationRestorer* restorer_; // Not owned. 74 RecommendationRestorer* restorer_; // Not owned.
75 75
76 scoped_refptr<base::TestSimpleTaskRunner> runner_; 76 scoped_refptr<base::TestSimpleTaskRunner> runner_;
77 base::ThreadTaskRunnerHandle runner_handler_; 77 base::ThreadTaskRunnerHandle runner_handler_;
78 78
79 private: 79 private:
80 scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs_owner_; 80 std::unique_ptr<syncable_prefs::PrefServiceSyncable> prefs_owner_;
81 81
82 TestingProfileManager profile_manager_; 82 TestingProfileManager profile_manager_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(RecommendationRestorerTest); 84 DISALLOW_COPY_AND_ASSIGN(RecommendationRestorerTest);
85 }; 85 };
86 86
87 RecommendationRestorerTest::RecommendationRestorerTest() 87 RecommendationRestorerTest::RecommendationRestorerTest()
88 : recommended_prefs_(new TestingPrefStore), 88 : recommended_prefs_(new TestingPrefStore),
89 prefs_(new syncable_prefs::TestingPrefServiceSyncable( 89 prefs_(new syncable_prefs::TestingPrefServiceSyncable(
90 new TestingPrefStore, 90 new TestingPrefStore,
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 // Fast forward until the reset timer fires. 555 // Fast forward until the reset timer fires.
556 VerifyTimerIsRunning(); 556 VerifyTimerIsRunning();
557 runner_->RunUntilIdle(); 557 runner_->RunUntilIdle();
558 VerifyPrefFollowsRecommendation(prefs::kAccessibilityLargeCursorEnabled, 558 VerifyPrefFollowsRecommendation(prefs::kAccessibilityLargeCursorEnabled,
559 base::FundamentalValue(false)); 559 base::FundamentalValue(false));
560 VerifyTimerIsStopped(); 560 VerifyTimerIsStopped();
561 } 561 }
562 562
563 } // namespace policy 563 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698