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

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

Issue 184043024: Limit scope of settings API configuration and proxy permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Bernhard's comments Created 6 years, 9 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 | Annotate | Revision Log
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 prefs()->SetIsIncognitoEnabled(extension->id(), true);
156 installed_[i] = true; 157 installed_[i] = true;
157 break; 158 break;
158 } 159 }
159 } 160 }
160 } 161 }
161 162
162 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( 163 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled(
163 const std::string& extension_id) { 164 const std::string& extension_id) {
164 Extension* extensions[] = { extension1(), 165 Extension* extensions[] = { extension1(),
165 extension2(), 166 extension2(),
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 EXPECT_EQ(kDefaultPref1, actual); 459 EXPECT_EQ(kDefaultPref1, actual);
459 } 460 }
460 } 461 }
461 462
462 private: 463 private:
463 int iteration_; 464 int iteration_;
464 }; 465 };
465 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { } 466 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { }
466 467
467 } // namespace extensions 468 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698