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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 return true; | 149 return true; |
| 150 #else |
| 151 return GetParam() == chrome_prefs::internals:: |
| 152 kSettingsEnforcementGroupNoEnforcement || |
| 153 GetParam() == chrome_prefs::internals:: |
| 154 kSettingsEnforcementGroupEnforceOnload; |
150 #endif // defined(OFFICIAL_BUILD) | 155 #endif // defined(OFFICIAL_BUILD) |
151 return GetParam() == chrome_prefs::internals:: | |
152 kSettingsEnforcementGroupNoEnforcement || | |
153 GetParam() == chrome_prefs::internals:: | |
154 kSettingsEnforcementGroupEnforceOnload; | |
155 } | 156 } |
156 }; | 157 }; |
157 | 158 |
158 #if defined(OS_CHROMEOS) | 159 #if defined(OS_CHROMEOS) |
159 // PrefHash service has been disabled on ChromeOS: crbug.com/343261 | 160 // PrefHash service has been disabled on ChromeOS: crbug.com/343261 |
160 #define MAYBE_PRE_PRE_InitializeUnloadedProfiles DISABLED_PRE_PRE_InitializeUnlo
adedProfiles | 161 #define MAYBE_PRE_PRE_InitializeUnloadedProfiles DISABLED_PRE_PRE_InitializeUnlo
adedProfiles |
161 #define MAYBE_PRE_InitializeUnloadedProfiles DISABLED_PRE_InitializeUnloadedProf
iles | 162 #define MAYBE_PRE_InitializeUnloadedProfiles DISABLED_PRE_InitializeUnloadedProf
iles |
162 #define MAYBE_InitializeUnloadedProfiles DISABLED_InitializeUnloadedProfiles | 163 #define MAYBE_InitializeUnloadedProfiles DISABLED_InitializeUnloadedProfiles |
163 #else | 164 #else |
164 #define MAYBE_PRE_PRE_InitializeUnloadedProfiles PRE_PRE_InitializeUnloadedProfi
les | 165 #define MAYBE_PRE_PRE_InitializeUnloadedProfiles PRE_PRE_InitializeUnloadedProfi
les |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 PrefHashBrowserTestInstance, | 317 PrefHashBrowserTestInstance, |
317 PrefHashBrowserTest, | 318 PrefHashBrowserTest, |
318 testing::Values( | 319 testing::Values( |
319 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement, | 320 chrome_prefs::internals::kSettingsEnforcementGroupNoEnforcement, |
320 chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload, | 321 chrome_prefs::internals::kSettingsEnforcementGroupEnforceOnload, |
321 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways, | 322 chrome_prefs::internals::kSettingsEnforcementGroupEnforceAlways, |
322 chrome_prefs::internals:: | 323 chrome_prefs::internals:: |
323 kSettingsEnforcementGroupEnforceAlwaysWithExtensions, | 324 kSettingsEnforcementGroupEnforceAlwaysWithExtensions, |
324 chrome_prefs::internals:: | 325 chrome_prefs::internals:: |
325 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE)); | 326 kSettingsEnforcementGroupEnforceAlwaysWithExtensionsAndDSE)); |
OLD | NEW |