summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 23:48:11 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 23:48:11 +0000
commite871f2fb0766080e7e341c38a451e2971aa56d1c (patch)
treecb5c7d3d1e5106eefaef36d742b3422676638f60 /chrome/browser/sync
parentab70f7e6997119226ca3a99ce599a4782c996fbb (diff)
downloadchromium_src-e871f2fb0766080e7e341c38a451e2971aa56d1c.zip
chromium_src-e871f2fb0766080e7e341c38a451e2971aa56d1c.tar.gz
chromium_src-e871f2fb0766080e7e341c38a451e2971aa56d1c.tar.bz2
[Sync] Don't show theme install butterbar if theme was installed by sync
Make ExtensionInstallUI::ShowThemeInfoBar() private. BUG=80062 TEST=Sync a theme to a computer. Make sure the install butterbar doesn't show. Review URL: http://codereview.chromium.org/6881093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/glue/theme_util.cc21
1 files changed, 1 insertions, 20 deletions
diff --git a/chrome/browser/sync/glue/theme_util.cc b/chrome/browser/sync/glue/theme_util.cc
index f43257d..2b47885 100644
--- a/chrome/browser/sync/glue/theme_util.cc
+++ b/chrome/browser/sync/glue/theme_util.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_updater.h"
#if defined(TOOLKIT_USES_GTK)
@@ -106,32 +105,14 @@ void SetCurrentThemeFromThemeSpecifics(
VLOG(1) << "Theme " << id << " is not enabled; aborting";
return;
}
- // Get previous theme info before we set the new theme.
- std::string previous_theme_id;
- {
- const Extension* current_theme =
- ThemeServiceFactory::GetThemeForProfile(profile);
- if (current_theme) {
- DCHECK(current_theme->is_theme());
- previous_theme_id = current_theme->id();
- }
- }
- bool previous_use_system_theme = UseSystemTheme(profile);
// An enabled theme extension with the given id was found, so
// just set the current theme to it.
ThemeServiceFactory::GetForProfile(profile)->SetTheme(extension);
- // Pretend the theme was just installed.
- ExtensionInstallUI::ShowThemeInfoBar(
- previous_theme_id, previous_use_system_theme,
- extension, profile);
} else {
// No extension with this id exists -- we must install it; we do
// so by adding it as a pending extension and then triggering an
// auto-update cycle.
- // Themes don't need to install silently as they just pop up an
- // informational dialog after installation instead of a
- // confirmation dialog.
- const bool kInstallSilently = false;
+ const bool kInstallSilently = true;
const bool kEnableOnInstall = true;
const bool kEnableIncognitoOnInstall = false;
extensions_service->pending_extension_manager()->AddFromSync(