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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_test_helper.cc

Issue 16770002: Restart Chrome if per session flags have been specified on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT and addressed Nico's comments. Created 7 years, 6 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/settings/device_settings_test_helper.h" 5 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "chrome/browser/chromeos/settings/device_settings_service.h" 10 #include "chrome/browser/chromeos/settings/device_settings_service.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 void DeviceSettingsTestHelper::StoreDeviceLocalAccountPolicy( 162 void DeviceSettingsTestHelper::StoreDeviceLocalAccountPolicy(
163 const std::string& account_id, 163 const std::string& account_id,
164 const std::string& policy_blob, 164 const std::string& policy_blob,
165 const StorePolicyCallback& callback) { 165 const StorePolicyCallback& callback) {
166 device_local_account_policy_[account_id].policy_blob_ = policy_blob; 166 device_local_account_policy_[account_id].policy_blob_ = policy_blob;
167 device_local_account_policy_[account_id].store_callbacks_.push_back(callback); 167 device_local_account_policy_[account_id].store_callbacks_.push_back(callback);
168 } 168 }
169 169
170 void DeviceSettingsTestHelper::SetFlagsForUser(
171 const std::string& account_id,
172 const std::vector<std::string>& flags) {}
173
170 DeviceSettingsTestHelper::PolicyState::PolicyState() 174 DeviceSettingsTestHelper::PolicyState::PolicyState()
171 : store_result_(true) {} 175 : store_result_(true) {}
172 176
173 DeviceSettingsTestHelper::PolicyState::~PolicyState() {} 177 DeviceSettingsTestHelper::PolicyState::~PolicyState() {}
174 178
175 ScopedDeviceSettingsTestHelper::ScopedDeviceSettingsTestHelper() { 179 ScopedDeviceSettingsTestHelper::ScopedDeviceSettingsTestHelper() {
176 DeviceSettingsService::Initialize(); 180 DeviceSettingsService::Initialize();
177 DeviceSettingsService::Get()->SetSessionManager(this, new MockOwnerKeyUtil()); 181 DeviceSettingsService::Get()->SetSessionManager(this, new MockOwnerKeyUtil());
178 DeviceSettingsService::Get()->Load(); 182 DeviceSettingsService::Get()->Load();
179 Flush(); 183 Flush();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 void DeviceSettingsTestBase::FlushDeviceSettings() { 217 void DeviceSettingsTestBase::FlushDeviceSettings() {
214 device_settings_test_helper_.Flush(); 218 device_settings_test_helper_.Flush();
215 } 219 }
216 220
217 void DeviceSettingsTestBase::ReloadDeviceSettings() { 221 void DeviceSettingsTestBase::ReloadDeviceSettings() {
218 device_settings_service_.OwnerKeySet(true); 222 device_settings_service_.OwnerKeySet(true);
219 FlushDeviceSettings(); 223 FlushDeviceSettings();
220 } 224 }
221 225
222 } // namespace chromeos 226 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698