diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 23:33:04 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 23:33:04 +0000 |
commit | aca840c242a14e1ee40665181b3515700c97e51b (patch) | |
tree | 4158cf866ad3930fb25895ed5e69325906066722 | |
parent | a0fddae546bb4c61d251c95a7ac56836b83aecc4 (diff) | |
download | chromium_src-aca840c242a14e1ee40665181b3515700c97e51b.zip chromium_src-aca840c242a14e1ee40665181b3515700c97e51b.tar.gz chromium_src-aca840c242a14e1ee40665181b3515700c97e51b.tar.bz2 |
Fix errors in ExtensionPrefs with storing the blacklist last ping day.
This moves where we were storing the blacklist last ping day so that we aren't
storing an invalid extension id in the prefs, and adds code to keep invalid ids
from being stored. It also removes some warnings in cases that aren't errors,
and finally adds some unit tests for extension_prefs to try and keep similar
problems from happening in the future.
BUG=40017
TEST=Should not get any DCHECK failures in Debug builds when you do an
extension update manually (via the chrome://extensions page) and then restart
the browser.
Review URL: http://codereview.chromium.org/1596008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43782 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/extensions/extension_prefs.cc | 83 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_prefs.h | 8 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_prefs_unittest.cc | 250 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_updater.cc | 21 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_updater_unittest.cc | 9 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 8 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_service.h | 6 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 1 |
8 files changed, 363 insertions, 23 deletions
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc index 2c72291..a1bbf9b 100644 --- a/chrome/browser/extensions/extension_prefs.cc +++ b/chrome/browser/extensions/extension_prefs.cc @@ -51,6 +51,9 @@ const wchar_t kExtensionToolbar[] = L"extensions.toolbar"; // its update check. const wchar_t kLastPingDay[] = L"lastpingday"; +// Path for settings specific to blacklist update. +const wchar_t kExtensionsBlacklistUpdate[] = L"extensions.blacklistupdate"; + // A preference that, if true, will allow this extension to run in incognito // mode. const wchar_t kPrefIncognitoEnabled[] = L"incognito"; @@ -58,9 +61,41 @@ const wchar_t kPrefIncognitoEnabled[] = L"incognito"; //////////////////////////////////////////////////////////////////////////////// +namespace { + +// TODO(asargent) - This is cleanup code for a key that was introduced into +// the extensions.settings sub-dictionary which wasn't a valid extension +// id. We can remove this in a couple of months. (See http://crbug.com/40017 +// and http://crbug.com/39745 for more details). +static void CleanupBadExtensionKeys(PrefService* prefs) { + DictionaryValue* dictionary = prefs->GetMutableDictionary(kExtensionsPref); + std::set<std::wstring> bad_keys; + for (DictionaryValue::key_iterator i = dictionary->begin_keys(); + i != dictionary->end_keys(); ++i) { + const std::wstring key_name = *i; + if (!Extension::IdIsValid(WideToASCII(key_name))) { + bad_keys.insert(key_name); + } + } + bool dirty = false; + for (std::set<std::wstring>::iterator i = bad_keys.begin(); + i != bad_keys.end(); ++i) { + dirty = true; + dictionary->Remove(*i, NULL); + } + if (dirty) + prefs->ScheduleSavePersistentPrefs(); +} + +} // namespace + ExtensionPrefs::ExtensionPrefs(PrefService* prefs, const FilePath& root_dir) : prefs_(prefs), install_directory_(root_dir) { + // TODO(asargent) - Remove this in a couple of months. (See comment above + // CleanupBadExtensionKeys). + CleanupBadExtensionKeys(prefs); + MakePathsRelative(); } @@ -253,8 +288,7 @@ void ExtensionPrefs::UpdateBlacklist( return; } -Time ExtensionPrefs::LastPingDay(const std::string& extension_id) const { - const DictionaryValue* dictionary = GetExtensionPref(extension_id); +Time ExtensionPrefs::LastPingDayImpl(const DictionaryValue* dictionary) const { if (dictionary && dictionary->HasKey(kLastPingDay)) { std::string string_value; int64 value; @@ -266,14 +300,37 @@ Time ExtensionPrefs::LastPingDay(const std::string& extension_id) const { return Time(); } -void ExtensionPrefs::SetLastPingDay(const std::string& extension_id, - const Time& time) { +void ExtensionPrefs::SetLastPingDayImpl(const Time& time, + DictionaryValue* dictionary) { + if (!dictionary) { + NOTREACHED(); + return; + } std::string value = Int64ToString(time.ToInternalValue()); - UpdateExtensionPref(extension_id, kLastPingDay, - Value::CreateStringValue(value)); + dictionary->SetString(kLastPingDay, value); prefs_->ScheduleSavePersistentPrefs(); } +Time ExtensionPrefs::LastPingDay(const std::string& extension_id) const { + DCHECK(Extension::IdIsValid(extension_id)); + return LastPingDayImpl(GetExtensionPref(extension_id)); +} + +Time ExtensionPrefs::BlacklistLastPingDay() const { + return LastPingDayImpl(prefs_->GetDictionary(kExtensionsBlacklistUpdate)); +} + +void ExtensionPrefs::SetLastPingDay(const std::string& extension_id, + const Time& time) { + DCHECK(Extension::IdIsValid(extension_id)); + SetLastPingDayImpl(time, GetExtensionPref(extension_id)); +} + +void ExtensionPrefs::SetBlacklistLastPingDay(const Time& time) { + SetLastPingDayImpl(time, + prefs_->GetMutableDictionary(kExtensionsBlacklistUpdate)); +} + bool ExtensionPrefs::IsIncognitoEnabled(const std::string& extension_id) { return ReadExtensionPrefBoolean(extension_id, kPrefIncognitoEnabled); } @@ -461,6 +518,10 @@ FilePath ExtensionPrefs::GetExtensionPath(const std::string& extension_id) { void ExtensionPrefs::UpdateExtensionPref(const std::string& extension_id, const std::wstring& key, Value* data_value) { + if (!Extension::IdIsValid(extension_id)) { + NOTREACHED() << "Invalid extension_id " << extension_id; + return; + } DictionaryValue* extension = GetOrCreateExtensionPref(extension_id); extension->Set(key, data_value); } @@ -476,6 +537,7 @@ void ExtensionPrefs::DeleteExtensionPrefs(const std::string& extension_id) { DictionaryValue* ExtensionPrefs::GetOrCreateExtensionPref( const std::string& extension_id) { + DCHECK(Extension::IdIsValid(extension_id)); DictionaryValue* dict = prefs_->GetMutableDictionary(kExtensionsPref); DictionaryValue* extension = NULL; std::wstring id = ASCIIToWide(extension_id); @@ -515,7 +577,6 @@ static ExtensionInfo* GetInstalledExtensionInfoImpl( return NULL; } if (is_blacklisted) { - LOG(WARNING) << "Blacklisted extension: " << *extension_id; return NULL; } } @@ -555,7 +616,8 @@ static ExtensionInfo* GetInstalledExtensionInfoImpl( } DictionaryValue* manifest = NULL; - if (!ext->GetDictionary(kPrefManifest, &manifest)) { + if (location != Extension::LOAD && + !ext->GetDictionary(kPrefManifest, &manifest)) { LOG(WARNING) << "Missing manifest for extension " << *extension_id; // Just a warning for now. } @@ -572,10 +634,6 @@ ExtensionPrefs::ExtensionsInfo* ExtensionPrefs::GetInstalledExtensionsInfo() { for (DictionaryValue::key_iterator extension_id( extension_data->begin_keys()); extension_id != extension_data->end_keys(); ++extension_id) { - // TODO(asargent): We store some autoupdated related state in the - // extensions area of the preferences without it actually being a valid - // extension. Need to fix all areas this breaks, or else reconsider where - // to store this data. if (!Extension::IdIsValid(WideToASCII(*extension_id))) continue; @@ -610,4 +668,5 @@ void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) { prefs->RegisterListPref(kExtensionShelf); prefs->RegisterListPref(kExtensionToolbar); prefs->RegisterIntegerPref(prefs::kExtensionToolbarSize, -1); + prefs->RegisterDictionaryPref(kExtensionsBlacklistUpdate); } diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h index f9a5aa6..45d142e 100644 --- a/chrome/browser/extensions/extension_prefs.h +++ b/chrome/browser/extensions/extension_prefs.h @@ -96,6 +96,10 @@ class ExtensionPrefs { // the client's. void SetLastPingDay(const std::string& extension_id, const base::Time& time); + // Similar to the 2 above, but for the extensions blacklist. + base::Time BlacklistLastPingDay() const; + void SetBlacklistLastPingDay(const base::Time& time); + // Returns true if the user enabled this extension to be loaded in incognito // mode. bool IsIncognitoEnabled(const std::string& extension_id); @@ -153,6 +157,10 @@ class ExtensionPrefs { // This is used to decide if an extension is blacklisted. bool IsBlacklistBitSet(DictionaryValue* ext); + // Helper methods for the public last ping day functions. + base::Time LastPingDayImpl(const DictionaryValue* dictionary) const; + void SetLastPingDayImpl(const base::Time& time, DictionaryValue* dictionary); + // The pref service specific to this set of extension prefs. PrefService* prefs_; diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc new file mode 100644 index 0000000..cd6c88a --- /dev/null +++ b/chrome/browser/extensions/extension_prefs_unittest.cc @@ -0,0 +1,250 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/message_loop.h" +#include "base/scoped_temp_dir.h" +#include "base/string_util.h" +#include "chrome/browser/chrome_thread.h" +#include "chrome/browser/extensions/extension_prefs.h" +#include "chrome/browser/pref_service.h" +#include "chrome/common/extensions/extension_constants.h" +#include "testing/gtest/include/gtest/gtest.h" + +using base::Time; +using base::TimeDelta; + +// Base class for tests. +class ExtensionPrefsTest : public testing::Test { + public: + ExtensionPrefsTest() { + EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); + FilePath preferences_file_ = temp_dir_.path().AppendASCII("Preferences"); + pref_service_.reset(new PrefService(preferences_file_)); + ExtensionPrefs::RegisterUserPrefs(pref_service_.get()); + CreateExtensionPrefs(); + } + + // This function will get called once, and is the right place to do operations + // on ExtensionPrefs that write data. + virtual void Initialize() = 0; + + // This function will be called twice - once while the original ExtensionPrefs + // object is still alive, and once after recreation. Thus, it tests that + // things don't break after any ExtensionPrefs startup work. + virtual void Verify() = 0; + + virtual void SetUp() { + Initialize(); + } + + virtual void TearDown() { + Verify(); + + // Reset ExtensionPrefs, and re-verify. + CreateExtensionPrefs(); + Verify(); + } + + protected: + // Creates an ExtensionPrefs object. + void CreateExtensionPrefs() { + prefs_.reset(new ExtensionPrefs(pref_service_.get(), temp_dir_.path())); + } + + // Creates a new Extension with the given name in our temp dir, adds it to + // our ExtensionPrefs, and returns it. + Extension* AddExtension(std::string name) { + FilePath path = temp_dir_.path().AppendASCII(name); + Extension* extension = new Extension(path); + std::string errors; + DictionaryValue dictionary; + dictionary.SetString(extension_manifest_keys::kName, name); + dictionary.SetString(extension_manifest_keys::kVersion, "0.1"); + EXPECT_TRUE(extension->InitFromValue(dictionary, false, &errors)); + extension->set_location(Extension::INTERNAL); + EXPECT_TRUE(Extension::IdIsValid(extension->id())); + prefs_->OnExtensionInstalled(extension); + return extension; + } + + // Creates an Extension and adds it to our ExtensionPrefs. Returns the + // extension id it was assigned. + std::string AddExtensionAndReturnId(std::string name) { + scoped_ptr<Extension> extension(AddExtension(name)); + return extension->id(); + } + + ScopedTempDir temp_dir_; + FilePath preferences_file_; + scoped_ptr<PrefService> pref_service_; + scoped_ptr<ExtensionPrefs> prefs_; + + private: + DISALLOW_COPY_AND_ASSIGN(ExtensionPrefsTest); +}; + +// Tests the LastPingDay/SetLastPingDay functions. +class ExtensionPrefsLastPingDay : public ExtensionPrefsTest { + public: + ExtensionPrefsLastPingDay() + : extension_time_(Time::Now() - TimeDelta::FromHours(4)), + blacklist_time_(Time::Now() - TimeDelta::FromHours(2)) {} + + virtual void Initialize() { + extension_id_ = AddExtensionAndReturnId("last_ping_day"); + EXPECT_TRUE(prefs_->LastPingDay(extension_id_).is_null()); + prefs_->SetLastPingDay(extension_id_, extension_time_); + prefs_->SetBlacklistLastPingDay(blacklist_time_); + } + + virtual void Verify() { + Time result = prefs_->LastPingDay(extension_id_); + EXPECT_FALSE(result.is_null()); + EXPECT_TRUE(result == extension_time_); + result = prefs_->BlacklistLastPingDay(); + EXPECT_FALSE(result.is_null()); + EXPECT_TRUE(result == blacklist_time_); + } + + private: + Time extension_time_; + Time blacklist_time_; + std::string extension_id_; +}; +TEST_F(ExtensionPrefsLastPingDay, LastPingDay) {} + + +// Tests the GetToolbarOrder/SetToolbarOrder functions. +class ExtensionPrefsToolbarOrder : public ExtensionPrefsTest { + public: + virtual void Initialize() { + list_.push_back(AddExtensionAndReturnId("1")); + list_.push_back(AddExtensionAndReturnId("2")); + list_.push_back(AddExtensionAndReturnId("3")); + std::vector<std::string> before_list = prefs_->GetToolbarOrder(); + EXPECT_TRUE(before_list.empty()); + prefs_->SetToolbarOrder(list_); + } + + virtual void Verify() { + std::vector<std::string> result = prefs_->GetToolbarOrder(); + ASSERT_EQ(list_.size(), result.size()); + for (size_t i = 0; i < list_.size(); i++) { + EXPECT_EQ(list_[i], result[i]); + } + } + + private: + std::vector<std::string> list_; +}; +TEST_F(ExtensionPrefsToolbarOrder, ToolbarOrder) {} + + +// Tests the GetExtensionState/SetExtensionState functions. +class ExtensionPrefsExtensionState : public ExtensionPrefsTest { + public: + virtual void Initialize() { + extension.reset(AddExtension("test")); + prefs_->SetExtensionState(extension.get(), Extension::DISABLED); + } + + virtual void Verify() { + EXPECT_EQ(Extension::DISABLED, prefs_->GetExtensionState(extension->id())); + } + + private: + scoped_ptr<Extension> extension; +}; +TEST_F(ExtensionPrefsExtensionState, ExtensionState) {} + + +class ExtensionPrefsEscalatePermissions : public ExtensionPrefsTest { + public: + virtual void Initialize() { + extension.reset(AddExtension("test")); + prefs_->SetDidExtensionEscalatePermissions(extension.get(), true); + } + + virtual void Verify() { + EXPECT_EQ(true, prefs_->DidExtensionEscalatePermissions(extension->id())); + } + + private: + scoped_ptr<Extension> extension; +}; +TEST_F(ExtensionPrefsEscalatePermissions, EscalatePermissions) {} + + +// Tests the GetVersionString function. +class ExtensionPrefsVersionString : public ExtensionPrefsTest { + public: + virtual void Initialize() { + extension.reset(AddExtension("test")); + EXPECT_EQ("0.1", prefs_->GetVersionString(extension->id())); + prefs_->OnExtensionUninstalled(extension->id(), Extension::INTERNAL, false); + } + + virtual void Verify() { + EXPECT_EQ("", prefs_->GetVersionString(extension->id())); + } + + private: + scoped_ptr<Extension> extension; +}; +TEST_F(ExtensionPrefsVersionString, VersionString) {} + +// Tests various areas of blacklist functionality. +class ExtensionPrefsBlacklist : public ExtensionPrefsTest { + public: + virtual void Initialize() { + not_installed_id_ = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + + // Install 5 extensions. + for (int i = 0; i < 5; i++) { + std::string name = "test" + IntToString(i); + extensions_.push_back(linked_ptr<Extension>(AddExtension(name))); + } + EXPECT_EQ(NULL, prefs_->GetInstalledExtensionInfo(not_installed_id_)); + + std::vector<linked_ptr<Extension> >::const_iterator iter; + for (iter = extensions_.begin(); iter != extensions_.end(); ++iter) { + EXPECT_FALSE(prefs_->IsExtensionBlacklisted((*iter)->id())); + } + // Blacklist one installed and one not-installed extension id. + std::set<std::string> blacklisted_ids; + blacklisted_ids.insert(extensions_[0]->id()); + blacklisted_ids.insert(not_installed_id_); + prefs_->UpdateBlacklist(blacklisted_ids); + } + + virtual void Verify() { + // Make sure the two id's we expect to be blacklisted are. + EXPECT_TRUE(prefs_->IsExtensionBlacklisted(extensions_[0]->id())); + EXPECT_TRUE(prefs_->IsExtensionBlacklisted(not_installed_id_)); + + // Make sure the other id's are not blacklisted. + std::vector<linked_ptr<Extension> >::const_iterator iter; + for (iter = extensions_.begin() + 1; iter != extensions_.end(); ++iter) { + EXPECT_FALSE(prefs_->IsExtensionBlacklisted((*iter)->id())); + } + + // Make sure GetInstalledExtensionsInfo returns only the non-blacklisted + // extensions data. + scoped_ptr<ExtensionPrefs::ExtensionsInfo> info( + prefs_->GetInstalledExtensionsInfo()); + EXPECT_EQ(4u, info->size()); + ExtensionPrefs::ExtensionsInfo::iterator info_iter; + for (info_iter = info->begin(); info_iter != info->end(); ++info_iter) { + ExtensionInfo* extension_info = info_iter->get(); + EXPECT_NE(extensions_[0]->id(), extension_info->extension_id); + } + } + + private: + std::vector<linked_ptr<Extension> > extensions_; + + // An id we'll make up that doesn't match any installed extension id. + std::string not_installed_id_; +}; +TEST_F(ExtensionPrefsBlacklist, Blacklist) {} diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index 9970cfe..09b90c8 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -144,12 +144,9 @@ bool ManifestFetchData::ShouldPing(int days) const { namespace { -// Calculates the value to use for the ping days parameter in manifest -// fetches for a given extension. -static int CalculatePingDays(const std::string& extension_id, - const ExtensionUpdateService& service) { +// Calculates the value to use for the ping days parameter. +static int CalculatePingDays(const Time& last_ping_day) { int days = ManifestFetchData::kNeverPinged; - Time last_ping_day = service.LastPingDay(extension_id); if (!last_ping_day.is_null()) { days = (Time::Now() - last_ping_day).InDays(); } @@ -260,7 +257,7 @@ void ManifestFetchesBuilder::AddExtensionData( fetches_.find(update_url); // Find or create a ManifestFetchData to add this extension to. - int ping_days = CalculatePingDays(id, *service_); + int ping_days = CalculatePingDays(service_->LastPingDay(id)); while (existing_iter != fetches_.end()) { if (existing_iter->second->AddExtension(id, version.GetString(), ping_days)) { @@ -554,10 +551,12 @@ void ExtensionUpdater::HandleManifestResults( std::set<std::string>::const_iterator i; for (i = extension_ids.begin(); i != extension_ids.end(); i++) { bool did_ping = fetch_data.DidPing(*i); - bool installed = (*i == kBlacklistAppID) || - (service_->GetExtensionById(*i, true) != NULL); - if (did_ping && installed) { - service_->SetLastPingDay(*i, daystart); + if (did_ping) { + if (*i == kBlacklistAppID) { + service_->SetBlacklistLastPingDay(daystart); + } else if (service_->GetExtensionById(*i, true) != NULL) { + service_->SetLastPingDay(*i, daystart); + } } } } @@ -706,7 +705,7 @@ void ExtensionUpdater::CheckNow() { ManifestFetchData* blacklist_fetch = new ManifestFetchData(GURL(kBlacklistUpdateUrl)); std::wstring version = prefs_->GetString(kExtensionBlacklistUpdateVersion); - int ping_days = CalculatePingDays(kBlacklistAppID, *service_); + int ping_days = CalculatePingDays(service_->BlacklistLastPingDay()); blacklist_fetch->AddExtension(kBlacklistAppID, WideToASCII(version), ping_days); StartUpdateCheck(blacklist_fetch); diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc index fd8a209..88c396d 100644 --- a/chrome/browser/extensions/extension_updater_unittest.cc +++ b/chrome/browser/extensions/extension_updater_unittest.cc @@ -92,11 +92,20 @@ class MockService : public ExtensionUpdateService { return Time(); } + virtual void SetBlacklistLastPingDay(const Time& time) { + blacklist_last_ping_day_ = time; + } + + virtual Time BlacklistLastPingDay() const { + return blacklist_last_ping_day_; + } + protected: PendingExtensionMap pending_extensions_; private: std::map<std::string, Time> last_ping_days_; + Time blacklist_last_ping_day_; DISALLOW_COPY_AND_ASSIGN(MockService); }; diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 756c750..288e73c 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -672,6 +672,14 @@ base::Time ExtensionsService::LastPingDay( return extension_prefs_->LastPingDay(extension_id); } +void ExtensionsService::SetBlacklistLastPingDay(const base::Time& time) { + extension_prefs_->SetBlacklistLastPingDay(time); +} + +base::Time ExtensionsService::BlacklistLastPingDay() const { + return extension_prefs_->BlacklistLastPingDay(); +} + bool ExtensionsService::IsIncognitoEnabled(const Extension* extension) { // If this is a component extension we always allow it to work in incognito // mode. diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h index 88565166..498711c 100644 --- a/chrome/browser/extensions/extensions_service.h +++ b/chrome/browser/extensions/extensions_service.h @@ -84,6 +84,10 @@ class ExtensionUpdateService { virtual void SetLastPingDay(const std::string& extension_id, const base::Time& time) = 0; virtual base::Time LastPingDay(const std::string& extension_id) const = 0; + + // Similar to the 2 above, but for the extensions blacklist. + virtual void SetBlacklistLastPingDay(const base::Time& time) = 0; + virtual base::Time BlacklistLastPingDay() const = 0; }; // Manages installed and running Chromium extensions. @@ -158,6 +162,8 @@ class ExtensionsService virtual void SetLastPingDay(const std::string& extension_id, const base::Time& time); virtual base::Time LastPingDay(const std::string& extension_id) const; + virtual void SetBlacklistLastPingDay(const base::Time& time); + virtual base::Time BlacklistLastPingDay() const; // Whether this extension can run in an incognito window. bool IsIncognitoEnabled(const Extension* extension); diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 431bef1..369dd35 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -745,6 +745,7 @@ 'browser/extensions/convert_user_script_unittest.cc', 'browser/extensions/extension_menu_manager_unittest.cc', 'browser/extensions/extension_messages_unittest.cc', + 'browser/extensions/extension_prefs_unittest.cc', 'browser/extensions/extension_process_manager_unittest.cc', 'browser/extensions/extension_ui_unittest.cc', 'browser/extensions/extension_updater_unittest.cc', |