Index: chrome/browser/ui/webui/options/content_settings_handler.cc |
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc |
index 7f0f3a64c0748e0bb5818b1e03a3830ed92c843b..557c90c8e56f5069ae83855e4395b8daa06012e3 100644 |
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc |
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc |
@@ -592,21 +592,6 @@ void ContentSettingsHandler::InitializeHandler() { |
base::Bind(&ContentSettingsHandler::OnZoomLevelChanged, |
base::Unretained(this))); |
- if (!switches::IsEnableWebviewBasedSignin()) { |
- // The legacy signin page uses a different storage partition, so we need to |
- // add a subscription for its HostZoomMap separately. |
- GURL signin_url(chrome::kChromeUIChromeSigninURL); |
- content::StoragePartition* signin_partition = |
- content::BrowserContext::GetStoragePartitionForSite( |
- GetBrowserContext(web_ui()), signin_url); |
- content::HostZoomMap* signin_host_zoom_map = |
- signin_partition->GetHostZoomMap(); |
- signin_host_zoom_map_subscription_ = |
- signin_host_zoom_map->AddZoomLevelChangedCallback( |
- base::Bind(&ContentSettingsHandler::OnZoomLevelChanged, |
- base::Unretained(this))); |
- } |
- |
flash_settings_manager_.reset(new PepperFlashSettingsManager(this, context)); |
Profile* profile = Profile::FromWebUI(web_ui()); |
@@ -963,42 +948,6 @@ void ContentSettingsHandler::UpdateMIDISysExExceptionsView() { |
CONTENT_SETTINGS_TYPE_MIDI_SYSEX); |
} |
-void ContentSettingsHandler::AdjustZoomLevelsListForSigninPageIfNecessary( |
- content::HostZoomMap::ZoomLevelVector* zoom_levels) { |
- if (switches::IsEnableWebviewBasedSignin()) |
- return; |
- |
- GURL signin_url(chrome::kChromeUIChromeSigninURL); |
- content::HostZoomMap* signin_host_zoom_map = |
- content::BrowserContext::GetStoragePartitionForSite( |
- GetBrowserContext(web_ui()), signin_url)->GetHostZoomMap(); |
- |
- // Since zoom levels set for scheme + host are not persisted, and since the |
- // signin page zoom levels need to be persisted, they are stored without |
- // a scheme. We use an empty scheme string to indicate this. |
- std::string scheme; |
- std::string host = signin_url.host(); |
- |
- // If there's a WebView signin zoom level, remove it. |
- content::HostZoomMap::ZoomLevelVector::iterator it = |
- std::find_if(zoom_levels->begin(), zoom_levels->end(), |
- [&host](content::HostZoomMap::ZoomLevelChange change) { |
- return change.host == host; |
- }); |
- if (it != zoom_levels->end()) |
- zoom_levels->erase(it); |
- |
- // If there's a non-WebView signin zoom level, add it. |
- if (signin_host_zoom_map->HasZoomLevel(scheme, host)) { |
- content::HostZoomMap::ZoomLevelChange change = { |
- content::HostZoomMap::ZOOM_CHANGED_FOR_HOST, |
- host, |
- scheme, |
- signin_host_zoom_map->GetZoomLevelForHostAndScheme(scheme, host)}; |
- zoom_levels->push_back(change); |
- } |
-} |
- |
void ContentSettingsHandler::UpdateZoomLevelsExceptionsView() { |
base::ListValue zoom_levels_exceptions; |
@@ -1008,8 +957,6 @@ void ContentSettingsHandler::UpdateZoomLevelsExceptionsView() { |
content::HostZoomMap::ZoomLevelVector zoom_levels( |
host_zoom_map->GetAllZoomLevels()); |
- AdjustZoomLevelsListForSigninPageIfNecessary(&zoom_levels); |
- |
// Sort ZoomLevelChanges by host and scheme |
// (a.com < http://a.com < https://a.com < b.com). |
std::sort(zoom_levels.begin(), zoom_levels.end(), |
@@ -1312,17 +1259,9 @@ void ContentSettingsHandler::RemoveZoomLevelException( |
} |
content::HostZoomMap* host_zoom_map; |
- if (switches::IsEnableWebviewBasedSignin() || |
- pattern != chrome::kChromeUIChromeSigninHost) { |
- host_zoom_map = |
- content::HostZoomMap::GetDefaultForBrowserContext( |
- GetBrowserContext(web_ui())); |
- } else { |
- host_zoom_map = |
- content::BrowserContext::GetStoragePartitionForSite( |
- GetBrowserContext(web_ui()), GURL(chrome::kChromeUIChromeSigninURL)) |
- ->GetHostZoomMap(); |
- } |
+ host_zoom_map = |
+ content::HostZoomMap::GetDefaultForBrowserContext( |
+ GetBrowserContext(web_ui())); |
double default_level = host_zoom_map->GetDefaultZoomLevel(); |
host_zoom_map->SetZoomLevelForHost(pattern, default_level); |
} |