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

Side by Side Diff: chrome/browser/ui/webui/settings/site_settings_handler.cc

Issue 2428433002: Delete fullscreen/mouselock pref data. (Closed)
Patch Set: Fix test by avoiding JS update calls. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/settings/site_settings_handler.h" 5 #include "chrome/browser/ui/webui/settings/site_settings_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 void SiteSettingsHandler::OnContentSettingChanged( 219 void SiteSettingsHandler::OnContentSettingChanged(
220 const ContentSettingsPattern& primary_pattern, 220 const ContentSettingsPattern& primary_pattern,
221 const ContentSettingsPattern& secondary_pattern, 221 const ContentSettingsPattern& secondary_pattern,
222 ContentSettingsType content_type, 222 ContentSettingsType content_type,
223 std::string resource_identifier) { 223 std::string resource_identifier) {
224 if (!site_settings::HasRegisteredGroupName(content_type)) 224 if (!site_settings::HasRegisteredGroupName(content_type))
225 return; 225 return;
226 226
227 // These content types are deprecated and should not trigger a UI update.
Matt Giuca 2016/10/26 04:18:24 I wish I didn't have to do this (it isn't strictly
stevenjb 2016/10/26 19:31:00 Could you add a TODO with a bug link? Generally mo
Matt Giuca 2016/10/26 23:26:47 Done.
228 if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN ||
229 content_type == CONTENT_SETTINGS_TYPE_MOUSELOCK) {
230 return;
231 }
232
227 if (primary_pattern.ToString().empty()) { 233 if (primary_pattern.ToString().empty()) {
228 CallJavascriptFunction( 234 CallJavascriptFunction(
229 "cr.webUIListenerCallback", 235 "cr.webUIListenerCallback",
230 base::StringValue("contentSettingCategoryChanged"), 236 base::StringValue("contentSettingCategoryChanged"),
231 base::StringValue(site_settings::ContentSettingsTypeToGroupName( 237 base::StringValue(site_settings::ContentSettingsTypeToGroupName(
232 content_type))); 238 content_type)));
233 } else { 239 } else {
234 CallJavascriptFunction( 240 CallJavascriptFunction(
235 "cr.webUIListenerCallback", 241 "cr.webUIListenerCallback",
236 base::StringValue("contentSettingSitePermissionChanged"), 242 base::StringValue("contentSettingSitePermissionChanged"),
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 origin = content::kUnreachableWebDataURL; 695 origin = content::kUnreachableWebDataURL;
690 } 696 }
691 697
692 content::HostZoomMap* host_zoom_map; 698 content::HostZoomMap* host_zoom_map;
693 host_zoom_map = content::HostZoomMap::GetDefaultForBrowserContext(profile_); 699 host_zoom_map = content::HostZoomMap::GetDefaultForBrowserContext(profile_);
694 double default_level = host_zoom_map->GetDefaultZoomLevel(); 700 double default_level = host_zoom_map->GetDefaultZoomLevel();
695 host_zoom_map->SetZoomLevelForHost(origin, default_level); 701 host_zoom_map->SetZoomLevelForHost(origin, default_level);
696 } 702 }
697 703
698 } // namespace settings 704 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698