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

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

Issue 7387010: Add PluginServiceFilter interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 4 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) 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_updater.h" 5 #include "chrome/browser/plugin_updater.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 return; 322 return;
323 notify_pending_ = true; 323 notify_pending_ = true;
324 MessageLoop::current()->PostTask( 324 MessageLoop::current()->PostTask(
325 FROM_HERE, 325 FROM_HERE,
326 NewRunnableFunction(&PluginUpdater::OnNotifyPluginStatusChanged)); 326 NewRunnableFunction(&PluginUpdater::OnNotifyPluginStatusChanged));
327 } 327 }
328 328
329 void PluginUpdater::OnNotifyPluginStatusChanged() { 329 void PluginUpdater::OnNotifyPluginStatusChanged() {
330 GetInstance()->notify_pending_ = false; 330 GetInstance()->notify_pending_ = false;
331 NotificationService::current()->Notify( 331 NotificationService::current()->Notify(
332 content::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 332 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
333 Source<PluginUpdater>(GetInstance()), 333 Source<PluginUpdater>(GetInstance()),
334 NotificationService::NoDetails()); 334 NotificationService::NoDetails());
335 } 335 }
336 336
337 /*static*/ 337 /*static*/
338 PluginUpdater* PluginUpdater::GetInstance() { 338 PluginUpdater* PluginUpdater::GetInstance() {
339 return Singleton<PluginUpdater>::get(); 339 return Singleton<PluginUpdater>::get();
340 } 340 }
341 341
342 /*static*/ 342 /*static*/
343 void PluginUpdater::RegisterPrefs(PrefService* prefs) { 343 void PluginUpdater::RegisterPrefs(PrefService* prefs) {
344 FilePath internal_dir; 344 FilePath internal_dir;
345 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 345 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
346 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 346 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
347 internal_dir, 347 internal_dir,
348 PrefService::UNSYNCABLE_PREF); 348 PrefService::UNSYNCABLE_PREF);
349 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins, 349 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins,
350 PrefService::UNSYNCABLE_PREF); 350 PrefService::UNSYNCABLE_PREF);
351 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, 351 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions,
352 PrefService::UNSYNCABLE_PREF); 352 PrefService::UNSYNCABLE_PREF);
353 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins, 353 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins,
354 PrefService::UNSYNCABLE_PREF); 354 PrefService::UNSYNCABLE_PREF);
355 } 355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698