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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Install extension the first time a preference is set for it. | 145 // Install extension the first time a preference is set for it. |
146 Extension* extensions[] = { extension1(), | 146 Extension* extensions[] = { extension1(), |
147 extension2(), | 147 extension2(), |
148 extension3(), | 148 extension3(), |
149 extension4() }; | 149 extension4() }; |
150 for (size_t i = 0; i < kNumInstalledExtensions; ++i) { | 150 for (size_t i = 0; i < kNumInstalledExtensions; ++i) { |
151 if (extension == extensions[i] && !installed_[i]) { | 151 if (extension == extensions[i] && !installed_[i]) { |
152 prefs()->OnExtensionInstalled(extension, | 152 prefs()->OnExtensionInstalled(extension, |
153 Extension::ENABLED, | 153 Extension::ENABLED, |
154 false, | 154 false, |
155 syncer::StringOrdinal()); | 155 syncer::StringOrdinal(), |
| 156 std::string()); |
156 prefs()->SetIsIncognitoEnabled(extension->id(), true); | 157 prefs()->SetIsIncognitoEnabled(extension->id(), true); |
157 installed_[i] = true; | 158 installed_[i] = true; |
158 break; | 159 break; |
159 } | 160 } |
160 } | 161 } |
161 } | 162 } |
162 | 163 |
163 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( | 164 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( |
164 const std::string& extension_id) { | 165 const std::string& extension_id) { |
165 Extension* extensions[] = { extension1(), | 166 Extension* extensions[] = { extension1(), |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 EXPECT_EQ(kDefaultPref1, actual); | 460 EXPECT_EQ(kDefaultPref1, actual); |
460 } | 461 } |
461 } | 462 } |
462 | 463 |
463 private: | 464 private: |
464 int iteration_; | 465 int iteration_; |
465 }; | 466 }; |
466 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { } | 467 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { } |
467 | 468 |
468 } // namespace extensions | 469 } // namespace extensions |
OLD | NEW |