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

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

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/password_manager/password_store_x.cc ('k') | chrome/browser/plugin_prefs.h » ('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"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 if (type == chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED) { 51 if (type == chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED) {
52 StartUpdate(); 52 StartUpdate();
53 } else { 53 } else {
54 NOTREACHED(); 54 NOTREACHED();
55 } 55 }
56 } 56 }
57 57
58 void PluginDataRemoverHelper::StartUpdate() { 58 void PluginDataRemoverHelper::StartUpdate() {
59 PluginService::GetInstance()->GetPlugins( 59 PluginService::GetInstance()->GetPlugins(
60 base::Bind(&PluginDataRemoverHelper::GotPlugins, factory_.GetWeakPtr(), 60 base::Bind(&PluginDataRemoverHelper::GotPlugins, factory_.GetWeakPtr(),
61 make_scoped_refptr(PluginPrefs::GetForProfile(profile_)))); 61 PluginPrefs::GetForProfile(profile_)));
62 } 62 }
63 63
64 void PluginDataRemoverHelper::GotPlugins( 64 void PluginDataRemoverHelper::GotPlugins(
65 scoped_refptr<PluginPrefs> plugin_prefs, 65 scoped_refptr<PluginPrefs> plugin_prefs,
66 const std::vector<webkit::WebPluginInfo>& plugins) { 66 const std::vector<webkit::WebPluginInfo>& plugins) {
67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
68 bool supported = IsSupported(plugin_prefs); 68 bool supported = IsSupported(plugin_prefs);
69 // 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
70 // notify observers if it changed. 70 // notify observers if it changed.
71 profile_->GetPrefs()->SetBoolean(pref_.GetPrefName().c_str(), supported); 71 profile_->GetPrefs()->SetBoolean(pref_.GetPrefName().c_str(), supported);
72 } 72 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_x.cc ('k') | chrome/browser/plugin_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698