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

Side by Side Diff: chrome/browser/extensions/test_extension_prefs.cc

Issue 8198003: Convert app_launch_index and page_index from int to StringOrdinal. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 2 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 FilePath path = extensions_dir_.AppendASCII(name); 130 FilePath path = extensions_dir_.AppendASCII(name);
131 std::string errors; 131 std::string errors;
132 scoped_refptr<Extension> extension = Extension::Create( 132 scoped_refptr<Extension> extension = Extension::Create(
133 path, location, manifest, extra_flags, &errors); 133 path, location, manifest, extra_flags, &errors);
134 EXPECT_TRUE(extension) << errors; 134 EXPECT_TRUE(extension) << errors;
135 if (!extension) 135 if (!extension)
136 return NULL; 136 return NULL;
137 137
138 EXPECT_TRUE(Extension::IdIsValid(extension->id())); 138 EXPECT_TRUE(Extension::IdIsValid(extension->id()));
139 prefs_->OnExtensionInstalled(extension, Extension::ENABLED, 139 prefs_->OnExtensionInstalled(extension, Extension::ENABLED,
140 extra_flags & Extension::FROM_WEBSTORE, 0); 140 extra_flags & Extension::FROM_WEBSTORE, "0");
141 return extension; 141 return extension;
142 } 142 }
143 143
144 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) { 144 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) {
145 scoped_refptr<Extension> extension(AddExtension(name)); 145 scoped_refptr<Extension> extension(AddExtension(name));
146 return extension->id(); 146 return extension->id();
147 } 147 }
148 148
149 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const { 149 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const {
150 return pref_service_->CreateIncognitoPrefService( 150 return pref_service_->CreateIncognitoPrefService(
151 new ExtensionPrefStore(extension_pref_value_map_.get(), true)); 151 new ExtensionPrefStore(extension_pref_value_map_.get(), true));
152 } 152 }
153 153
154 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { 154 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) {
155 extensions_disabled_ = extensions_disabled; 155 extensions_disabled_ = extensions_disabled;
156 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698