OLD | NEW |
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 13 matching lines...) Expand all Loading... |
24 #include "chrome/common/pepper_flash.h" | 24 #include "chrome/common/pepper_flash.h" |
25 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
26 #include "chrome/grit/generated_resources.h" | 26 #include "chrome/grit/generated_resources.h" |
27 #include "components/content_settings/core/browser/host_content_settings_map.h" | 27 #include "components/content_settings/core/browser/host_content_settings_map.h" |
28 #include "components/prefs/pref_service.h" | 28 #include "components/prefs/pref_service.h" |
29 #include "components/prefs/scoped_user_pref_update.h" | 29 #include "components/prefs/scoped_user_pref_update.h" |
30 #include "content/public/browser/notification_observer.h" | 30 #include "content/public/browser/notification_observer.h" |
31 #include "content/public/browser/plugin_service.h" | 31 #include "content/public/browser/plugin_service.h" |
32 #include "content/public/browser/web_ui.h" | 32 #include "content/public/browser/web_ui.h" |
33 #include "content/public/common/content_constants.h" | 33 #include "content/public/common/content_constants.h" |
34 #include "mojo/common/common_type_converters.h" | |
35 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
36 | 35 |
37 using content::WebPluginInfo; | 36 using content::WebPluginInfo; |
38 // Holds grouped plugins. The key is the group identifier and | 37 // Holds grouped plugins. The key is the group identifier and |
39 // the value is the list of plugins belonging to the group. | 38 // the value is the list of plugins belonging to the group. |
40 using PluginGroups = | 39 using PluginGroups = |
41 base::hash_map<std::string, std::vector<const content::WebPluginInfo*>>; | 40 base::hash_map<std::string, std::vector<const content::WebPluginInfo*>>; |
42 | 41 |
43 namespace { | 42 namespace { |
44 | 43 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 328 } |
330 | 329 |
331 if (plugins_enabled_by_policy) | 330 if (plugins_enabled_by_policy) |
332 return "enabledByPolicy"; | 331 return "enabledByPolicy"; |
333 if (plugins_disabled_by_policy) | 332 if (plugins_disabled_by_policy) |
334 return "disabledByPolicy"; | 333 return "disabledByPolicy"; |
335 if (plugins_managed_by_policy) | 334 if (plugins_managed_by_policy) |
336 return "managedByPolicy"; | 335 return "managedByPolicy"; |
337 return group_enabled ? "enabledByUser" : "disabledByUser"; | 336 return group_enabled ? "enabledByUser" : "disabledByUser"; |
338 } | 337 } |
OLD | NEW |