Commit 6958da5f authored by Gayane Petrosyan's avatar Gayane Petrosyan Committed by Commit Bot

[Chrome Colors] Cleanup during shutdown.

Bug: 1008813
Change-Id: I700da434baeecc626196b7e725adcf1262f558fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829943Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703838}
parent 85fedecc
......@@ -114,6 +114,8 @@ void ChromeColorsService::SaveThemeRevertState(content::WebContents* tab) {
}
}
void ChromeColorsService::Shutdown() {}
void ChromeColorsService::Shutdown() {
RevertThemeChangesWithReason(RevertReason::SHUTDOWN);
}
} // namespace chrome_colors
......@@ -25,7 +25,8 @@ enum class RevertReason {
SEARCH_PROVIDER_CHANGE = 1,
TAB_CLOSED = 2,
NAVIGATION = 3,
kMaxValue = NAVIGATION,
SHUTDOWN = 4,
kMaxValue = SHUTDOWN,
};
// Supports theme changes originating from the NTP customization menu. Users can
......
......@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_service.h"
......@@ -13,6 +14,7 @@
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "extensions/browser/extension_prefs_factory.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_registry_factory.h"
......@@ -51,6 +53,8 @@ ThemeServiceFactory::ThemeServiceFactory()
"ThemeService",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
DependsOn(extensions::ExtensionSystemFactory::GetInstance());
}
ThemeServiceFactory::~ThemeServiceFactory() {}
......
......@@ -7718,6 +7718,7 @@ histogram as enum -->
<int value="1" label="Search provider change"/>
<int value="2" label="Tab closed"/>
<int value="3" label="Navigation"/>
<int value="4" label="Shutdown"/>
</enum>
<enum name="ChromeDownloadCountType">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment