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

Side by Side Diff: chrome/browser/plugin_data_remover_helper.cc

Issue 9006036: Create an API around PluginService and use it from Chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/plugin_prefs.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/plugin_data_remover_helper.h" 5 #include "chrome/browser/plugin_data_remover_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/plugin_prefs.h" 10 #include "chrome/browser/plugin_prefs.h"
11 #include "chrome/browser/prefs/pref_service.h" 11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "content/browser/plugin_service.h"
15 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
16 #include "content/public/browser/notification_source.h" 15 #include "content/public/browser/notification_source.h"
17 #include "content/public/browser/plugin_data_remover.h" 16 #include "content/public/browser/plugin_data_remover.h"
17 #include "content/public/browser/plugin_service.h"
18 #include "webkit/plugins/webplugininfo.h"
18 19
19 using content::BrowserThread; 20 using content::BrowserThread;
21 using content::PluginService;
20 22
21 PluginDataRemoverHelper::PluginDataRemoverHelper() 23 PluginDataRemoverHelper::PluginDataRemoverHelper()
22 : profile_(NULL), 24 : profile_(NULL),
23 ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {} 25 ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {}
24 26
25 PluginDataRemoverHelper::~PluginDataRemoverHelper() { 27 PluginDataRemoverHelper::~PluginDataRemoverHelper() {
26 } 28 }
27 29
28 void PluginDataRemoverHelper::Init(const char* pref_name, 30 void PluginDataRemoverHelper::Init(const char* pref_name,
29 Profile* profile, 31 Profile* profile,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 63
62 void PluginDataRemoverHelper::GotPlugins( 64 void PluginDataRemoverHelper::GotPlugins(
63 scoped_refptr<PluginPrefs> plugin_prefs, 65 scoped_refptr<PluginPrefs> plugin_prefs,
64 const std::vector<webkit::WebPluginInfo>& plugins) { 66 const std::vector<webkit::WebPluginInfo>& plugins) {
65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
66 bool supported = IsSupported(plugin_prefs); 68 bool supported = IsSupported(plugin_prefs);
67 // Set the value on the PrefService instead of through the PrefMember to 69 // Set the value on the PrefService instead of through the PrefMember to
68 // notify observers if it changed. 70 // notify observers if it changed.
69 profile_->GetPrefs()->SetBoolean(pref_.GetPrefName().c_str(), supported); 71 profile_->GetPrefs()->SetBoolean(pref_.GetPrefName().c_str(), supported);
70 } 72 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/plugin_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698