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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 can_enable = false; 157 can_enable = false;
158 } else { 158 } else {
159 if (plugin_status == POLICY_ENABLED || group_status == POLICY_ENABLED) 159 if (plugin_status == POLICY_ENABLED || group_status == POLICY_ENABLED)
160 can_enable = false; 160 can_enable = false;
161 } 161 }
162 } else { 162 } else {
163 NOTREACHED(); 163 NOTREACHED();
164 } 164 }
165 165
166 if (!can_enable) { 166 if (!can_enable) {
167 MessageLoop::current()->PostTask(FROM_HERE, 167 base::MessageLoop::current()->PostTask(FROM_HERE,
168 base::Bind(callback, false)); 168 base::Bind(callback, false));
169 return; 169 return;
170 } 170 }
171 171
172 PluginService::GetInstance()->GetPlugins( 172 PluginService::GetInstance()->GetPlugins(
173 base::Bind(&PluginPrefs::EnablePluginInternal, this, 173 base::Bind(&PluginPrefs::EnablePluginInternal, this,
174 enabled, path, finder, callback)); 174 enabled, path, finder, callback));
175 } 175 }
176 176
177 void PluginPrefs::EnablePluginInternal( 177 void PluginPrefs::EnablePluginInternal(
178 bool enabled, 178 bool enabled,
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 } 665 }
666 } 666 }
667 667
668 void PluginPrefs::NotifyPluginStatusChanged() { 668 void PluginPrefs::NotifyPluginStatusChanged() {
669 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 669 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
670 content::NotificationService::current()->Notify( 670 content::NotificationService::current()->Notify(
671 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 671 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
672 content::Source<Profile>(profile_), 672 content::Source<Profile>(profile_),
673 content::NotificationService::NoDetails()); 673 content::NotificationService::NoDetails());
674 } 674 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_x_unittest.cc ('k') | chrome/browser/plugins/plugin_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698