OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |