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

Side by Side Diff: chrome/browser/ui/chrome_pages.cc

Issue 2682293002: Add desktop UI for the subresource filter content setting. (Closed)
Patch Set: cs_ui Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_pages.h" 5 #include "chrome/browser/ui/chrome_pages.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // TODO(tommycli): Update the group names defined in site_settings_helper once 156 // TODO(tommycli): Update the group names defined in site_settings_helper once
157 // Options is removed from Chrome. Then this list will no longer be needed. 157 // Options is removed from Chrome. Then this list will no longer be needed.
158 typedef std::map<ContentSettingsType, std::string> ContentSettingPathMap; 158 typedef std::map<ContentSettingsType, std::string> ContentSettingPathMap;
159 CR_DEFINE_STATIC_LOCAL( 159 CR_DEFINE_STATIC_LOCAL(
160 ContentSettingPathMap, kSettingsPathOverrides, 160 ContentSettingPathMap, kSettingsPathOverrides,
161 ({{CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "automaticDownloads"}, 161 ({{CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "automaticDownloads"},
162 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, "backgroundSync"}, 162 {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, "backgroundSync"},
163 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "microphone"}, 163 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "microphone"},
164 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "camera"}, 164 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "camera"},
165 {CONTENT_SETTINGS_TYPE_PLUGINS, "flash"}, 165 {CONTENT_SETTINGS_TYPE_PLUGINS, "flash"},
166 {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, "subresourceFilter"},
166 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "unsandboxedPlugins"}})); 167 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "unsandboxedPlugins"}}));
167 const auto it = kSettingsPathOverrides.find(type); 168 const auto it = kSettingsPathOverrides.find(type);
168 const std::string content_type_path = 169 const std::string content_type_path =
169 (it == kSettingsPathOverrides.end()) 170 (it == kSettingsPathOverrides.end())
170 ? site_settings::ContentSettingsTypeToGroupName(type) 171 ? site_settings::ContentSettingsTypeToGroupName(type)
171 : it->second; 172 : it->second;
172 173
173 return std::string(kContentSettingsSubPage) + "/" + content_type_path; 174 return std::string(kContentSettingsSubPage) + "/" + content_type_path;
174 } 175 }
175 176
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 SigninManagerFactory::GetForProfile(original_profile); 456 SigninManagerFactory::GetForProfile(original_profile);
456 DCHECK(manager->IsSigninAllowed()); 457 DCHECK(manager->IsSigninAllowed());
457 if (manager->IsAuthenticated()) 458 if (manager->IsAuthenticated())
458 ShowSettings(browser); 459 ShowSettings(browser);
459 else 460 else
460 ShowBrowserSignin(browser, access_point); 461 ShowBrowserSignin(browser, access_point);
461 } 462 }
462 #endif 463 #endif
463 464
464 } // namespace chrome 465 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698