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

Side by Side Diff: chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc

Issue 282103003: Moved IS_EPHEMERAL flag to extension prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up file header Created 6 years, 7 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
OLDNEW
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Install extension the first time a preference is set for it. 162 // Install extension the first time a preference is set for it.
163 Extension* extensions[] = { extension1(), 163 Extension* extensions[] = { extension1(),
164 extension2(), 164 extension2(),
165 extension3(), 165 extension3(),
166 extension4() }; 166 extension4() };
167 for (size_t i = 0; i < kNumInstalledExtensions; ++i) { 167 for (size_t i = 0; i < kNumInstalledExtensions; ++i) {
168 if (extension == extensions[i] && !installed_[i]) { 168 if (extension == extensions[i] && !installed_[i]) {
169 prefs()->OnExtensionInstalled(extension, 169 prefs()->OnExtensionInstalled(extension,
170 Extension::ENABLED, 170 Extension::ENABLED,
171 false, 171 false,
172 false,
172 syncer::StringOrdinal(), 173 syncer::StringOrdinal(),
173 std::string()); 174 std::string());
174 prefs()->SetIsIncognitoEnabled(extension->id(), true); 175 prefs()->SetIsIncognitoEnabled(extension->id(), true);
175 installed_[i] = true; 176 installed_[i] = true;
176 break; 177 break;
177 } 178 }
178 } 179 }
179 } 180 }
180 181
181 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( 182 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled(
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 EXPECT_EQ(kDefaultPref1, actual); 478 EXPECT_EQ(kDefaultPref1, actual);
478 } 479 }
479 } 480 }
480 481
481 private: 482 private:
482 int iteration_; 483 int iteration_;
483 }; 484 };
484 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { } 485 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { }
485 486
486 } // namespace extensions 487 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698