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

Side by Side Diff: chrome/browser/ui/webui/plugins/plugins_handler.cc

Issue 2530563002: Remove the enable/disable links for the about:plugins page. (Closed)
Patch Set: Created 4 years 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/plugins/plugins_handler.h" 5 #include "chrome/browser/ui/webui/plugins/plugins_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 Profile* profile = Profile::FromWebUI(web_ui_); 106 Profile* profile = Profile::FromWebUI(web_ui_);
107 PrefService* prefs = profile->GetPrefs(); 107 PrefService* prefs = profile->GetPrefs();
108 show_details_.Init(prefs::kPluginsShowDetails, prefs); 108 show_details_.Init(prefs::kPluginsShowDetails, prefs);
109 109
110 registrar_.Add(this, chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 110 registrar_.Add(this, chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
111 content::Source<Profile>(profile)); 111 content::Source<Profile>(profile));
112 } 112 }
113 113
114 PluginsPageHandler::~PluginsPageHandler() {} 114 PluginsPageHandler::~PluginsPageHandler() {}
115 115
116 void PluginsPageHandler::SetPluginEnabled(const std::string& plugin_path,
117 bool enable) {
118 // TODO(http://crbug.com/615738): Remove this page altogether.
119 }
120
121 void PluginsPageHandler::SetPluginGroupEnabled(const std::string& group_name,
122 bool enable) {
123 // TODO(http://crbug.com/615738): Remove this page altogether.
124 }
125
126 void PluginsPageHandler::GetShowDetails( 116 void PluginsPageHandler::GetShowDetails(
127 const GetShowDetailsCallback& callback) { 117 const GetShowDetailsCallback& callback) {
128 callback.Run(show_details_.GetValue()); 118 callback.Run(show_details_.GetValue());
129 } 119 }
130 120
131 void PluginsPageHandler::SaveShowDetailsToPrefs(bool details_mode) { 121 void PluginsPageHandler::SaveShowDetailsToPrefs(bool details_mode) {
132 show_details_.SetValue(details_mode); 122 show_details_.SetValue(details_mode);
133 } 123 }
134 124
135 void PluginsPageHandler::SetPluginAlwaysAllowed(const std::string& plugin, 125 void PluginsPageHandler::SetPluginAlwaysAllowed(const std::string& plugin,
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 329 }
340 330
341 if (plugins_enabled_by_policy) 331 if (plugins_enabled_by_policy)
342 return "enabledByPolicy"; 332 return "enabledByPolicy";
343 if (plugins_disabled_by_policy) 333 if (plugins_disabled_by_policy)
344 return "disabledByPolicy"; 334 return "disabledByPolicy";
345 if (plugins_managed_by_policy) 335 if (plugins_managed_by_policy)
346 return "managedByPolicy"; 336 return "managedByPolicy";
347 return group_enabled ? "enabledByUser" : "disabledByUser"; 337 return group_enabled ? "enabledByUser" : "disabledByUser";
348 } 338 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/plugins/plugins_handler.h ('k') | chrome/browser/ui/webui/plugins/plugins_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698