| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/prefs/pref_service.h" | |
| 15 #include "base/prefs/scoped_user_pref_update.h" | |
| 16 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 17 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 18 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 16 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 19 #include "chrome/browser/plugins/plugin_finder.h" | 17 #include "chrome/browser/plugins/plugin_finder.h" |
| 20 #include "chrome/browser/plugins/plugin_metadata.h" | 18 #include "chrome/browser/plugins/plugin_metadata.h" |
| 21 #include "chrome/browser/plugins/plugin_prefs.h" | 19 #include "chrome/browser/plugins/plugin_prefs.h" |
| 22 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/common/chrome_content_client.h" | 21 #include "chrome/common/chrome_content_client.h" |
| 24 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
| 25 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 26 #include "chrome/grit/generated_resources.h" | 24 #include "chrome/grit/generated_resources.h" |
| 27 #include "components/content_settings/core/browser/host_content_settings_map.h" | 25 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 26 #include "components/prefs/pref_service.h" |
| 27 #include "components/prefs/scoped_user_pref_update.h" |
| 28 #include "content/public/browser/notification_observer.h" | 28 #include "content/public/browser/notification_observer.h" |
| 29 #include "content/public/browser/plugin_service.h" | 29 #include "content/public/browser/plugin_service.h" |
| 30 #include "content/public/browser/web_ui.h" | 30 #include "content/public/browser/web_ui.h" |
| 31 #include "content/public/common/content_constants.h" | 31 #include "content/public/common/content_constants.h" |
| 32 #include "mojo/common/common_type_converters.h" | 32 #include "mojo/common/common_type_converters.h" |
| 33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
| 34 | 34 |
| 35 using content::WebPluginInfo; | 35 using content::WebPluginInfo; |
| 36 // Holds grouped plugins. The key is the group identifier and | 36 // Holds grouped plugins. The key is the group identifier and |
| 37 // the value is the list of plugins belonging to the group. | 37 // the value is the list of plugins belonging to the group. |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 } | 344 } |
| 345 | 345 |
| 346 if (plugins_enabled_by_policy) | 346 if (plugins_enabled_by_policy) |
| 347 return "enabledByPolicy"; | 347 return "enabledByPolicy"; |
| 348 if (plugins_disabled_by_policy) | 348 if (plugins_disabled_by_policy) |
| 349 return "disabledByPolicy"; | 349 return "disabledByPolicy"; |
| 350 if (plugins_managed_by_policy) | 350 if (plugins_managed_by_policy) |
| 351 return "managedByPolicy"; | 351 return "managedByPolicy"; |
| 352 return group_enabled ? "enabledByUser" : "disabledByUser"; | 352 return group_enabled ? "enabledByUser" : "disabledByUser"; |
| 353 } | 353 } |
| OLD | NEW |