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

Side by Side Diff: chrome/browser/extensions/test_extension_prefs.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/test_extension_prefs.h" 5 #include "chrome/browser/extensions/test_extension_prefs.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 scoped_refptr<Extension> extension = Extension::Create( 158 scoped_refptr<Extension> extension = Extension::Create(
159 path, location, manifest, extra_flags, &errors); 159 path, location, manifest, extra_flags, &errors);
160 EXPECT_TRUE(extension.get()) << errors; 160 EXPECT_TRUE(extension.get()) << errors;
161 if (!extension.get()) 161 if (!extension.get())
162 return NULL; 162 return NULL;
163 163
164 EXPECT_TRUE(Extension::IdIsValid(extension->id())); 164 EXPECT_TRUE(Extension::IdIsValid(extension->id()));
165 prefs_->OnExtensionInstalled(extension.get(), 165 prefs_->OnExtensionInstalled(extension.get(),
166 Extension::ENABLED, 166 Extension::ENABLED,
167 false, 167 false,
168 false,
168 syncer::StringOrdinal::CreateInitialOrdinal(), 169 syncer::StringOrdinal::CreateInitialOrdinal(),
169 std::string()); 170 std::string());
170 return extension; 171 return extension;
171 } 172 }
172 173
173 std::string TestExtensionPrefs::AddExtensionAndReturnId( 174 std::string TestExtensionPrefs::AddExtensionAndReturnId(
174 const std::string& name) { 175 const std::string& name) {
175 scoped_refptr<Extension> extension(AddExtension(name)); 176 scoped_refptr<Extension> extension(AddExtension(name));
176 return extension->id(); 177 return extension->id();
177 } 178 }
178 179
179 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const { 180 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const {
180 return pref_service_->CreateIncognitoPrefService( 181 return pref_service_->CreateIncognitoPrefService(
181 new ExtensionPrefStore(extension_pref_value_map_.get(), true)); 182 new ExtensionPrefStore(extension_pref_value_map_.get(), true));
182 } 183 }
183 184
184 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { 185 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) {
185 extensions_disabled_ = extensions_disabled; 186 extensions_disabled_ = extensions_disabled;
186 } 187 }
187 188
188 } // namespace extensions 189 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/shared_module_service_unittest.cc ('k') | chrome/browser/extensions/unpacked_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698