diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-08 17:54:09 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-08 17:54:09 +0000 |
commit | d743a598543343501ec40884ec8acb8f017cc6a1 (patch) | |
tree | 2e0ec7f87dcc1c6c5f073a9b0d23294effd0fcd2 | |
parent | fb3b1f899004d887a296b5a069dc46f11a8844b3 (diff) | |
download | chromium_src-d743a598543343501ec40884ec8acb8f017cc6a1.zip chromium_src-d743a598543343501ec40884ec8acb8f017cc6a1.tar.gz chromium_src-d743a598543343501ec40884ec8acb8f017cc6a1.tar.bz2 |
Remove chat manager component extension in favour of external extensions.
I originally added this in r60123 but over time it turned out that being a regular installed app will work out better.
BUG=none
TEST=chat manager should no longer be a component extension on Chrome OS builds
Review URL: http://codereview.chromium.org/4652002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65393 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/generated_resources.grd | 6 | ||||
-rw-r--r-- | chrome/browser/browser_resources.grd | 1 | ||||
-rw-r--r-- | chrome/browser/chromeos/dom_ui/labs_handler.cc | 5 | ||||
-rw-r--r-- | chrome/browser/chromeos/preferences.cc | 30 | ||||
-rw-r--r-- | chrome/browser/chromeos/preferences.h | 13 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_service_unittest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/profile_impl.cc | 7 | ||||
-rw-r--r-- | chrome/browser/resources/options/chromeos_labs.html | 17 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 33 | ||||
-rw-r--r-- | chrome/common/pref_names.cc | 4 | ||||
-rw-r--r-- | chrome/common/pref_names.h | 1 |
11 files changed, 6 insertions, 117 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 2964ae5..07ac811 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -9125,9 +9125,6 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_ADVANCEDFS"> Enable Advanced File System, including USB and SD card support </message> - <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_TALK"> - Talk - </message> <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_SIDE_TABS"> Side tabs </message> @@ -9146,9 +9143,6 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_OPTIONS_SETTINGS_ADVANCEDFS_DESCRIPTION" desc="In the settings tab, the text next to the checkbox for the filesystem."> Advanced Filesystem including USB/SD card support. </message> - <message name="IDS_OPTIONS_SETTINGS_TALK_DESCRIPTION" desc="In the settings tab, the text next to the checkbox to turn on Talk."> - Use Google Talk to chat across browser tabs. - </message> <message name="IDS_OPTIONS_SETTINGS_SIDE_TABS_DESCRIPTION" desc="In the settings tab, the text next to the checkbox to turn on side tabs."> Show tabs on the left side. </message> diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index 0f639f2..82c0731 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd @@ -85,7 +85,6 @@ without changes to the corresponding grd file. et --> <include name="IDR_OFFLINE_LOAD_HTML" file="resources\offline_load.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_OS_CREDITS_HTML" file="resources\about_os_credits.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_SLIDESHOW_HTML" file="resources\slideshow.html" flattenhtml="true" type="BINDATA" /> - <include name="IDR_TALK_APP_MANIFEST" file="resources\chat_manager\manifest.json" type="BINDATA" /> <include name="IDR_MENU_HTML" file="resources\menu.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_NETWORK_MENU_CSS" file="resources\network_menu.css" flattenhtml="true" type="BINDATA" /> <include name="IDR_NETWORK_MENU_JS" file="resources\network_menu.js" flattenhtml="true" type="BINDATA" /> diff --git a/chrome/browser/chromeos/dom_ui/labs_handler.cc b/chrome/browser/chromeos/dom_ui/labs_handler.cc index 3a9a239..da605aa 100644 --- a/chrome/browser/chromeos/dom_ui/labs_handler.cc +++ b/chrome/browser/chromeos/dom_ui/labs_handler.cc @@ -31,11 +31,6 @@ void LabsHandler::GetLocalizedValues( localized_strings->SetString("advanced_filesystem", l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_ADVANCEDFS_DESCRIPTION)); - localized_strings->SetString("talk_title", - l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_SECTION_TITLE_TALK)); - localized_strings->SetString("talk", - l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_TALK_DESCRIPTION)); - localized_strings->SetString("side_tabs_title", l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_SECTION_TITLE_SIDE_TABS)); localized_strings->SetString("side_tabs", diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc index 8d66c82..12c1502 100644 --- a/chrome/browser/chromeos/preferences.cc +++ b/chrome/browser/chromeos/preferences.cc @@ -14,10 +14,8 @@ #include "chrome/browser/chromeos/cros/power_library.h" #include "chrome/browser/chromeos/cros/touchpad_library.h" #include "chrome/browser/chromeos/input_method/input_method_util.h" -#include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/prefs/pref_member.h" #include "chrome/browser/prefs/pref_service.h" -#include "chrome/browser/profile.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "unicode/timezone.h" @@ -25,11 +23,10 @@ namespace chromeos { static const char kFallbackInputMethodLocale[] = "en-US"; -static const char kTalkAppExtensionId[] = "ggnioahjipcehijkhpdjekioddnjoben"; -Preferences::Preferences(Profile* profile) - : profile_(profile) { -} +Preferences::Preferences() {} + +Preferences::~Preferences() {} // static void Preferences::RegisterUserPrefs(PrefService* prefs) { @@ -42,7 +39,6 @@ void Preferences::RegisterUserPrefs(PrefService* prefs) { if (prefs->FindPreference(prefs::kAccessibilityEnabled) == NULL) { prefs->RegisterBooleanPref(prefs::kAccessibilityEnabled, false); } - prefs->RegisterIntegerPref(prefs::kLabsTalkEnabled, 1); prefs->RegisterIntegerPref(prefs::kTouchpadSensitivity, 3); prefs->RegisterStringPref(prefs::kLanguageCurrentInputMethod, ""); prefs->RegisterStringPref(prefs::kLanguagePreviousInputMethod, ""); @@ -185,8 +181,6 @@ void Preferences::Init(PrefService* prefs) { language_xkb_auto_repeat_interval_pref_.Init( prefs::kLanguageXkbAutoRepeatInterval, prefs, this); - labs_talk_enabled_.Init(prefs::kLabsTalkEnabled, prefs, this); - enable_screen_lock_.Init(prefs::kEnableScreenLock, prefs, this); // Initialize touchpad settings to what's saved in user preferences. @@ -346,11 +340,6 @@ void Preferences::NotifyPrefChanged(const std::string* pref_name) { UpdateAutoRepeatRate(); } - // Listen for explicit changes as ExtensionsService handles startup case. - if (pref_name && *pref_name == prefs::kLabsTalkEnabled) { - UpdateTalkApp(); - } - // Init or update power manager config. if (!pref_name || *pref_name == prefs::kEnableScreenLock) { CrosLibrary::Get()->GetPowerLibrary()->EnableScreenLock( @@ -446,17 +435,4 @@ void Preferences::UpdateAutoRepeatRate() { CrosLibrary::Get()->GetKeyboardLibrary()->SetAutoRepeatRate(rate); } -void Preferences::UpdateTalkApp() { - if (!profile_->GetExtensionsService()->is_ready()) { - NOTREACHED() << "Extensions service should be ready"; - return; - } - - if (labs_talk_enabled_.GetValue() == 0) { - profile_->GetExtensionsService()->DisableExtension(kTalkAppExtensionId); - } else { - profile_->GetExtensionsService()->EnableExtension(kTalkAppExtensionId); - } -} - } // namespace chromeos diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h index 9269915..6568961 100644 --- a/chrome/browser/chromeos/preferences.h +++ b/chrome/browser/chromeos/preferences.h @@ -14,7 +14,6 @@ #include "chrome/common/notification_observer.h" class PrefService; -class Profile; namespace chromeos { @@ -24,8 +23,8 @@ namespace chromeos { // When the preferences change, we change the settings to reflect the new value. class Preferences : public NotificationObserver { public: - explicit Preferences(Profile* profile); - virtual ~Preferences() {} + Preferences(); + virtual ~Preferences(); // This method will register the prefs associated with Chrome OS settings. static void RegisterUserPrefs(PrefService* prefs); @@ -83,11 +82,6 @@ class Preferences : public NotificationObserver { // underlying XKB API requires it. void UpdateAutoRepeatRate(); - // Updates whether the Talk app is enabled. - void UpdateTalkApp(); - - Profile* profile_; - BooleanPrefMember tap_to_click_enabled_; BooleanPrefMember vert_edge_scroll_enabled_; BooleanPrefMember accessibility_enabled_; @@ -126,9 +120,6 @@ class Preferences : public NotificationObserver { IntegerPrefMember language_xkb_auto_repeat_delay_pref_; IntegerPrefMember language_xkb_auto_repeat_interval_pref_; - // Labs preferences. - IntegerPrefMember labs_talk_enabled_; - BooleanPrefMember enable_screen_lock_; DISALLOW_COPY_AND_ASSIGN(Preferences); diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc index 522a23d..fa8f341 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extensions_service_unittest.cc @@ -342,12 +342,6 @@ void ExtensionsServiceTestBase::InitializeExtensionsService( profile_.reset(profile); - // TODO(scherkus): Remove this when we no longer need to have Talk - // component extension state as a preference http://crbug.com/56429 - DictionaryValue* dict = - profile->GetPrefs()->GetMutableDictionary("extensions.settings"); - dict->Remove("ggnioahjipcehijkhpdjekioddnjoben", NULL); - service_ = profile->CreateExtensionsService( CommandLine::ForCurrentProcess(), extensions_install_dir); diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc index 40d5ed7..649ef1c 100644 --- a/chrome/browser/profile_impl.cc +++ b/chrome/browser/profile_impl.cc @@ -318,7 +318,7 @@ ProfileImpl::ProfileImpl(const FilePath& path) SSLConfigServiceManager::CreateDefaultManager(this)); #if defined(OS_CHROMEOS) - chromeos_preferences_.reset(new chromeos::Preferences(this)); + chromeos_preferences_.reset(new chromeos::Preferences()); chromeos_preferences_->Init(prefs); #endif @@ -400,11 +400,6 @@ void ProfileImpl::RegisterComponentExtensions() { component_extensions.push_back( std::make_pair("web_store", IDR_WEBSTORE_MANIFEST)); -#if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) - component_extensions.push_back( - std::make_pair("chat_manager", IDR_TALK_APP_MANIFEST)); -#endif - for (ComponentExtensionList::iterator iter = component_extensions.begin(); iter != component_extensions.end(); ++iter) { FilePath path; diff --git a/chrome/browser/resources/options/chromeos_labs.html b/chrome/browser/resources/options/chromeos_labs.html index 66d245b..56f6619 100644 --- a/chrome/browser/resources/options/chromeos_labs.html +++ b/chrome/browser/resources/options/chromeos_labs.html @@ -33,23 +33,6 @@ </div> </section> <section> - <h3 i18n-content="talk_title"></h3> - <div class="option"> - <table class="option-control-table"> - <tr> - <td class="option-name"> - <label class="checkbox"> - <input id="talk-check" - pref="extensions.settings.ggnioahjipcehijkhpdjekioddnjoben.state" - type="checkbox" value-type="number"> - <span i18n-content="talk"></span> - </label> - </td> - </tr> - </table> - </div> - </section> - <section> <h3 i18n-content="side_tabs_title"></h3> <div class="option"> <table class="option-control-table"> diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 9ff7768..bfc8853 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -14,7 +14,6 @@ 'chrome_extra_resources', 'chrome_resources', 'chrome_strings', - 'component_extensions', 'debugger', 'device_management_backend_proto', 'installer_util', @@ -4177,38 +4176,6 @@ ], }, { - 'target_name': 'component_extensions', - 'type': 'none', - 'msvs_guid': '50B52703-525F-404C-BFE2-C46D3375D73E', - 'conditions': [ - ['OS=="linux" and chromeos==1 and branding=="Chrome"',{ - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)/resources/chat_manager', - 'files': [ - 'browser/resources/chat_manager/background.html', - 'browser/resources/chat_manager/central_roster.html', - 'browser/resources/chat_manager/central_roster_viewer.html', - 'browser/resources/chat_manager/manifest.json', - 'browser/resources/chat_manager/128.png', - 'browser/resources/chat_manager/48.png', - 'browser/resources/chat_manager/32.png', - 'browser/resources/chat_manager/24.png', - ] - }, - { - 'destination': '<(PRODUCT_DIR)/resources/chat_manager/js', - 'files': [ - 'browser/resources/chat_manager/js/chatbridgeeventtypes.js', - 'browser/resources/chat_manager/js/chatbridgehook.js', - 'browser/resources/chat_manager/js/gmailbridgehook.js', - ] - }, - ] - }] - ], - }, - { # Protobuf compiler / generate rule for feedback 'target_name': 'userfeedback_proto', 'type': 'none', diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index f5d4836..9c91912 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -397,10 +397,6 @@ const char kLabsAdvancedFilesystemEnabled[] = // A boolean pref which turns on the mediaplayer. const char kLabsMediaplayerEnabled[] = "settings.labs.mediaplayer"; -// An integer pref which maps to the extension state for Talk. -const char kLabsTalkEnabled[] = - "extensions.settings.ggnioahjipcehijkhpdjekioddnjoben.state"; - // A boolean pref that turns on screen locker. const char kEnableScreenLock[] = "settings.enable_screen_lock"; diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 5799ec0..0d5275c 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h @@ -146,7 +146,6 @@ extern const char kLanguageXkbAutoRepeatInterval[]; extern const char kAccessibilityEnabled[]; extern const char kLabsAdvancedFilesystemEnabled[]; extern const char kLabsMediaplayerEnabled[]; -extern const char kLabsTalkEnabled[]; extern const char kEnableScreenLock[]; #endif extern const char kIpcDisabledMessages[]; |