OLD | NEW |
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/plugins/plugin_prefs.h" | 5 #include "chrome/browser/plugins/plugin_prefs.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/prefs/scoped_user_pref_update.h" | 14 #include "base/prefs/scoped_user_pref_update.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/chrome_notification_types.h" | 20 #include "chrome/browser/chrome_notification_types.h" |
21 #include "chrome/browser/plugins/plugin_installer.h" | 21 #include "chrome/browser/plugins/plugin_installer.h" |
22 #include "chrome/browser/plugins/plugin_metadata.h" | 22 #include "chrome/browser/plugins/plugin_metadata.h" |
23 #include "chrome/browser/plugins/plugin_prefs_factory.h" | 23 #include "chrome/browser/plugins/plugin_prefs_factory.h" |
24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/common/chrome_constants.h" | 25 #include "chrome/common/chrome_constants.h" |
26 #include "chrome/common/chrome_content_client.h" | 26 #include "chrome/common/chrome_content_client.h" |
27 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
28 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "components/component_updater/component_updater_constants.h" |
30 #include "components/keyed_service/core/keyed_service.h" | 31 #include "components/keyed_service/core/keyed_service.h" |
31 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
32 #include "content/public/browser/notification_service.h" | 33 #include "content/public/browser/notification_service.h" |
33 #include "content/public/browser/plugin_service.h" | 34 #include "content/public/browser/plugin_service.h" |
34 #include "content/public/common/webplugininfo.h" | 35 #include "content/public/common/webplugininfo.h" |
35 | 36 |
36 using content::BrowserThread; | 37 using content::BrowserThread; |
37 using content::PluginService; | 38 using content::PluginService; |
38 | 39 |
39 namespace { | 40 namespace { |
40 | 41 |
41 bool IsComponentUpdatedPepperFlash(const base::FilePath& plugin) { | 42 bool IsComponentUpdatedPepperFlash(const base::FilePath& plugin) { |
42 if (plugin.BaseName().value() == chrome::kPepperFlashPluginFilename) { | 43 if (plugin.BaseName().value() == |
| 44 component_updater::kPepperFlashPluginFilename) { |
43 base::FilePath component_updated_pepper_flash_dir; | 45 base::FilePath component_updated_pepper_flash_dir; |
44 if (PathService::Get(chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, | 46 if (PathService::Get(chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, |
45 &component_updated_pepper_flash_dir) && | 47 &component_updated_pepper_flash_dir) && |
46 component_updated_pepper_flash_dir.IsParent(plugin)) { | 48 component_updated_pepper_flash_dir.IsParent(plugin)) { |
47 return true; | 49 return true; |
48 } | 50 } |
49 } | 51 } |
50 | 52 |
51 return false; | 53 return false; |
52 } | 54 } |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 } | 575 } |
574 } | 576 } |
575 | 577 |
576 void PluginPrefs::NotifyPluginStatusChanged() { | 578 void PluginPrefs::NotifyPluginStatusChanged() { |
577 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 579 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
578 content::NotificationService::current()->Notify( | 580 content::NotificationService::current()->Notify( |
579 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 581 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
580 content::Source<Profile>(profile_), | 582 content::Source<Profile>(profile_), |
581 content::NotificationService::NoDetails()); | 583 content::NotificationService::NoDetails()); |
582 } | 584 } |
OLD | NEW |