OLD | NEW |
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/prefs/mock_pref_change_callback.h" | 9 #include "base/prefs/mock_pref_change_callback.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 Extension* extension) { | 159 Extension* extension) { |
160 // Install extension the first time a preference is set for it. | 160 // Install extension the first time a preference is set for it. |
161 Extension* extensions[] = { extension1(), | 161 Extension* extensions[] = { extension1(), |
162 extension2(), | 162 extension2(), |
163 extension3(), | 163 extension3(), |
164 extension4() }; | 164 extension4() }; |
165 for (size_t i = 0; i < kNumInstalledExtensions; ++i) { | 165 for (size_t i = 0; i < kNumInstalledExtensions; ++i) { |
166 if (extension == extensions[i] && !installed_[i]) { | 166 if (extension == extensions[i] && !installed_[i]) { |
167 prefs()->OnExtensionInstalled(extension, | 167 prefs()->OnExtensionInstalled(extension, |
168 Extension::ENABLED, | 168 Extension::ENABLED, |
| 169 Extension::DISABLE_NONE, |
169 syncer::StringOrdinal(), | 170 syncer::StringOrdinal(), |
170 std::string()); | 171 std::string()); |
171 prefs()->SetIsIncognitoEnabled(extension->id(), true); | 172 prefs()->SetIsIncognitoEnabled(extension->id(), true); |
172 installed_[i] = true; | 173 installed_[i] = true; |
173 break; | 174 break; |
174 } | 175 } |
175 } | 176 } |
176 } | 177 } |
177 | 178 |
178 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( | 179 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 EXPECT_EQ(kDefaultPref1, actual); | 474 EXPECT_EQ(kDefaultPref1, actual); |
474 } | 475 } |
475 } | 476 } |
476 | 477 |
477 private: | 478 private: |
478 int iteration_; | 479 int iteration_; |
479 }; | 480 }; |
480 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { } | 481 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { } |
481 | 482 |
482 } // namespace extensions | 483 } // namespace extensions |
OLD | NEW |