OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <set> | 5 #include <set> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 protected: | 139 protected: |
140 const bool is_unloaded_profile_seeding_allowed_; | 140 const bool is_unloaded_profile_seeding_allowed_; |
141 | 141 |
142 private: | 142 private: |
143 bool IsUnloadedProfileSeedingAllowed() const { | 143 bool IsUnloadedProfileSeedingAllowed() const { |
144 #if defined(OFFICIAL_BUILD) | 144 #if defined(OFFICIAL_BUILD) |
145 // SettingsEnforcement can't be forced via --force-fieldtrials in official | 145 // SettingsEnforcement can't be forced via --force-fieldtrials in official |
146 // builds. Explicitly return whether the default in | 146 // builds. Explicitly return whether the default in |
147 // chrome_pref_service_factory.cc allows unloaded profile seeding on this | 147 // chrome_pref_service_factory.cc allows unloaded profile seeding on this |
148 // platform. | 148 // platform. |
149 #if defined(OS_WIN) | 149 return true; |
150 return false; | |
151 #else | |
152 return true; | |
153 #endif // defined(OS_WIN) | |
154 #endif // defined(OFFICIAL_BUILD) | 150 #endif // defined(OFFICIAL_BUILD) |
155 return GetParam() == chrome_prefs::internals:: | 151 return GetParam() == chrome_prefs::internals:: |
156 kSettingsEnforcementGroupNoEnforcement || | 152 kSettingsEnforcementGroupNoEnforcement || |
157 GetParam() == chrome_prefs::internals:: | 153 GetParam() == chrome_prefs::internals:: |
158 kSettingsEnforcementGroupEnforceOnload; | 154 kSettingsEnforcementGroupEnforceOnload; |
159 } | 155 } |
160 }; | 156 }; |
161 | 157 |
162 #if defined(OS_CHROMEOS) | 158 #if defined(OS_CHROMEOS) |
163 // PrefHash service has been disabled on ChromeOS: crbug.com/343261 | 159 // PrefHash service has been disabled on ChromeOS: crbug.com/343261 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 PrefHashBrowserTestInstance, | 316 PrefHashBrowserTestInstance, |
321 PrefHashBrowserTest, | 317 PrefHashBrowserTest, |
322 testing::Values( | 318 testing::Values( |
323 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement, | 319 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement, |
324 chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload, | 320 chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload, |
325 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways, | 321 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways, |
326 chrome_prefs::internals:: | 322 chrome_prefs::internals:: |
327 kSettingsEnforcementGroupEnforceAlwaysWithExtensions, | 323 kSettingsEnforcementGroupEnforceAlwaysWithExtensions, |
328 chrome_prefs::internals:: | 324 chrome_prefs::internals:: |
329 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE)); | 325 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE)); |
OLD | NEW |