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

Side by Side Diff: components/policy/core/common/policy_statistics_collector_unittest.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 #include "components/policy/core/common/policy_statistics_collector.h" 5 #include "components/policy/core/common/policy_statistics_collector.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 policy_statistics_collector_.reset(new TestPolicyStatisticsCollector( 102 policy_statistics_collector_.reset(new TestPolicyStatisticsCollector(
103 policy_details_.GetCallback(), 103 policy_details_.GetCallback(),
104 chrome_schema_, 104 chrome_schema_,
105 &policy_service_, 105 &policy_service_,
106 &prefs_, 106 &prefs_,
107 task_runner_)); 107 task_runner_));
108 } 108 }
109 109
110 void SetPolicy(const std::string& name) { 110 void SetPolicy(const std::string& name) {
111 policy_map_.Set(name, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 111 policy_map_.Set(name, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
112 POLICY_SOURCE_CLOUD, 112 POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>(true),
113 base::MakeUnique<base::FundamentalValue>(true), nullptr); 113 nullptr);
114 } 114 }
115 115
116 base::TimeDelta GetFirstDelay() const { 116 base::TimeDelta GetFirstDelay() const {
117 if (!task_runner_->HasPendingTask()) { 117 if (!task_runner_->HasPendingTask()) {
118 ADD_FAILURE(); 118 ADD_FAILURE();
119 return base::TimeDelta(); 119 return base::TimeDelta();
120 } 120 }
121 return task_runner_->NextPendingTaskDelay(); 121 return task_runner_->NextPendingTaskDelay();
122 } 122 }
123 123
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 EXPECT_CALL(*policy_statistics_collector_.get(), 185 EXPECT_CALL(*policy_statistics_collector_.get(),
186 RecordPolicyUse(kTestPolicy1Id)); 186 RecordPolicyUse(kTestPolicy1Id));
187 EXPECT_CALL(*policy_statistics_collector_.get(), 187 EXPECT_CALL(*policy_statistics_collector_.get(),
188 RecordPolicyUse(kTestPolicy2Id)); 188 RecordPolicyUse(kTestPolicy2Id));
189 189
190 policy_statistics_collector_->Initialize(); 190 policy_statistics_collector_->Initialize();
191 EXPECT_EQ(1u, task_runner_->NumPendingTasks()); 191 EXPECT_EQ(1u, task_runner_->NumPendingTasks());
192 } 192 }
193 193
194 } // namespace policy 194 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_service_impl_unittest.cc ('k') | components/policy/core/common/preg_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698