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

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

Issue 322893002: Cleanup: Make ExtensionService::OnExtensionInstalled take a bitmask instead of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more win compile fixes Created 6 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 Extension* extension) { 161 Extension* extension) {
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,
172 false,
173 syncer::StringOrdinal(), 171 syncer::StringOrdinal(),
174 std::string()); 172 std::string());
175 prefs()->SetIsIncognitoEnabled(extension->id(), true); 173 prefs()->SetIsIncognitoEnabled(extension->id(), true);
176 installed_[i] = true; 174 installed_[i] = true;
177 break; 175 break;
178 } 176 }
179 } 177 }
180 } 178 }
181 179
182 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( 180 void ExtensionControlledPrefsTest::EnsureExtensionUninstalled(
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 EXPECT_EQ(kDefaultPref1, actual); 476 EXPECT_EQ(kDefaultPref1, actual);
479 } 477 }
480 } 478 }
481 479
482 private: 480 private:
483 int iteration_; 481 int iteration_;
484 }; 482 };
485 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { } 483 TEST_F(ControlledPrefsDisableExtensions, ControlledPrefsDisableExtensions) { }
486 484
487 } // namespace extensions 485 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698