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

Side by Side Diff: chrome/browser/plugins/plugin_prefs.cc

Issue 10918174: Remove PluginGroup (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_async_plugin_finder
Patch Set: fix conflicts Created 8 years, 2 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
« no previous file with comments | « chrome/browser/plugins/plugin_prefs.h ('k') | chrome/browser/plugins/plugin_prefs_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/profiles/profile_keyed_service.h" 25 #include "chrome/browser/profiles/profile_keyed_service.h"
26 #include "chrome/common/chrome_constants.h" 26 #include "chrome/common/chrome_constants.h"
27 #include "chrome/common/chrome_content_client.h" 27 #include "chrome/common/chrome_content_client.h"
28 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
29 #include "chrome/common/chrome_paths.h" 29 #include "chrome/common/chrome_paths.h"
30 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/pref_names.h" 31 #include "chrome/common/pref_names.h"
32 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
33 #include "content/public/browser/notification_service.h" 33 #include "content/public/browser/notification_service.h"
34 #include "content/public/browser/plugin_service.h" 34 #include "content/public/browser/plugin_service.h"
35 #include "webkit/plugins/npapi/plugin_group.h"
36 #include "webkit/plugins/npapi/plugin_list.h" 35 #include "webkit/plugins/npapi/plugin_list.h"
37 #include "webkit/plugins/npapi/plugin_utils.h" 36 #include "webkit/plugins/npapi/plugin_utils.h"
38 #include "webkit/plugins/webplugininfo.h" 37 #include "webkit/plugins/webplugininfo.h"
39 38
40 using content::BrowserThread; 39 using content::BrowserThread;
41 using content::PluginService; 40 using content::PluginService;
42 41
43 namespace { 42 namespace {
44 43
45 // How long to wait to save the plugin enabled information, which might need to 44 // How long to wait to save the plugin enabled information, which might need to
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 608
610 registrar_.Init(prefs_); 609 registrar_.Init(prefs_);
611 registrar_.Add(prefs::kPluginsDisabledPlugins, this); 610 registrar_.Add(prefs::kPluginsDisabledPlugins, this);
612 registrar_.Add(prefs::kPluginsDisabledPluginsExceptions, this); 611 registrar_.Add(prefs::kPluginsDisabledPluginsExceptions, this);
613 registrar_.Add(prefs::kPluginsEnabledPlugins, this); 612 registrar_.Add(prefs::kPluginsEnabledPlugins, this);
614 registrar_.Add(prefs::kPluginsDisabledPluginsByVersion, this); 613 registrar_.Add(prefs::kPluginsDisabledPluginsByVersion, this);
615 614
616 if (force_enable_internal_pdf || internal_pdf_enabled) { 615 if (force_enable_internal_pdf || internal_pdf_enabled) {
617 // See http://crbug.com/50105 for background. 616 // See http://crbug.com/50105 for background.
618 plugin_group_state_[ASCIIToUTF16( 617 plugin_group_state_[ASCIIToUTF16(
619 webkit::npapi::PluginGroup::kAdobeReaderGroupName)] = false; 618 PluginMetadata::kAdobeReaderGroupName)] = false;
620 } 619 }
621 620
622 if (force_enable_internal_pdf || force_enable_nacl) { 621 if (force_enable_internal_pdf || force_enable_nacl) {
623 // We want to save this, but doing so requires loading the list of plugins, 622 // We want to save this, but doing so requires loading the list of plugins,
624 // so do it after a minute as to not impact startup performance. Note that 623 // so do it after a minute as to not impact startup performance. Note that
625 // plugins are loaded after 30s by the metrics service. 624 // plugins are loaded after 30s by the metrics service.
626 BrowserThread::PostDelayedTask( 625 BrowserThread::PostDelayedTask(
627 BrowserThread::FILE, 626 BrowserThread::FILE,
628 FROM_HERE, 627 FROM_HERE,
629 base::Bind(&PluginPrefs::GetPreferencesDataOnFileThread, this), 628 base::Bind(&PluginPrefs::GetPreferencesDataOnFileThread, this),
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 } 719 }
721 } 720 }
722 721
723 void PluginPrefs::NotifyPluginStatusChanged() { 722 void PluginPrefs::NotifyPluginStatusChanged() {
724 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 723 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
725 content::NotificationService::current()->Notify( 724 content::NotificationService::current()->Notify(
726 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 725 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
727 content::Source<Profile>(profile_), 726 content::Source<Profile>(profile_),
728 content::NotificationService::NoDetails()); 727 content::NotificationService::NoDetails());
729 } 728 }
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_prefs.h ('k') | chrome/browser/plugins/plugin_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698