Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8251)

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 230503004: Don't show temporary patterns in chrome://settings/contentExceptions#zoomlevels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97a932442ae626b05ee2d24f5a460d90a1c6d325..49e936e3411cb31e3163042fd3090427227631d5 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -42,7 +42,6 @@
#include "content/public/browser/web_ui.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/page_zoom.h"
-#include "content/public/common/url_constants.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/permissions/api_permission.h"
#include "grit/generated_resources.h"
@@ -1006,8 +1005,8 @@ void ContentSettingsHandler::UpdateZoomLevelsExceptionsView() {
exception->SetString(kOrigin, i->host);
break;
case content::HostZoomMap::ZOOM_CHANGED_FOR_SCHEME_AND_HOST:
- exception->SetString(
- kOrigin, i->scheme + content::kStandardSchemeSeparator + i->host);
+ // These are not stored in preferences and get cleared on next browser
+ // start. Therefore, we don't care for them.
break;
case content::HostZoomMap::ZOOM_CHANGED_TEMPORARY_ZOOM:
NOTREACHED();
@@ -1242,17 +1241,7 @@ void ContentSettingsHandler::RemoveZoomLevelException(
content::HostZoomMap* host_zoom_map =
content::HostZoomMap::GetForBrowserContext(Profile::FromWebUI(web_ui()));
double default_level = host_zoom_map->GetDefaultZoomLevel();
-
- std::string::size_type scheme_separator_position =
- pattern.find(content::kStandardSchemeSeparator);
- if (scheme_separator_position == std::string::npos) {
- host_zoom_map->SetZoomLevelForHost(pattern, default_level);
- } else {
- std::string scheme = pattern.substr(0, scheme_separator_position);
- std::string host = pattern.substr(
- scheme_separator_position + strlen(content::kStandardSchemeSeparator));
- host_zoom_map->SetZoomLevelForHostAndScheme(scheme, host, default_level);
- }
+ host_zoom_map->SetZoomLevelForHost(pattern, default_level);
}
void ContentSettingsHandler::RegisterMessages() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698