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

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

Issue 2819023: Reworked ExtensionsService::AddPendingExtension(). (Closed)
Patch Set: Fixed browsertest test failure Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 7
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 Extension* TestExtensionPrefs::AddExtensionWithManifest( 62 Extension* TestExtensionPrefs::AddExtensionWithManifest(
63 const DictionaryValue& manifest) { 63 const DictionaryValue& manifest) {
64 std::string name; 64 std::string name;
65 EXPECT_TRUE(manifest.GetString(extension_manifest_keys::kName, &name)); 65 EXPECT_TRUE(manifest.GetString(extension_manifest_keys::kName, &name));
66 FilePath path = extensions_dir_.AppendASCII(name); 66 FilePath path = extensions_dir_.AppendASCII(name);
67 Extension* extension = new Extension(path); 67 Extension* extension = new Extension(path);
68 std::string errors; 68 std::string errors;
69 EXPECT_TRUE(extension->InitFromValue(manifest, false, &errors)); 69 EXPECT_TRUE(extension->InitFromValue(manifest, false, &errors));
70 extension->set_location(Extension::INTERNAL); 70 extension->set_location(Extension::INTERNAL);
71 EXPECT_TRUE(Extension::IdIsValid(extension->id())); 71 EXPECT_TRUE(Extension::IdIsValid(extension->id()));
72 prefs_->OnExtensionInstalled(extension); 72 const bool kInitialIncognitoEnabled = false;
73 prefs_->OnExtensionInstalled(extension, Extension::ENABLED,
74 kInitialIncognitoEnabled);
73 return extension; 75 return extension;
74 } 76 }
75 77
76 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) { 78 std::string TestExtensionPrefs::AddExtensionAndReturnId(std::string name) {
77 scoped_ptr<Extension> extension(AddExtension(name)); 79 scoped_ptr<Extension> extension(AddExtension(name));
78 return extension->id(); 80 return extension->id();
79 } 81 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/sync/glue/extension_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698