OLD | NEW |
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/plugin_prefs.h" | 5 #include "chrome/browser/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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 } | 430 } |
431 | 431 |
432 if (force_enable_internal_pdf || force_enable_nacl) { | 432 if (force_enable_internal_pdf || force_enable_nacl) { |
433 // We want to save this, but doing so requires loading the list of plugins, | 433 // We want to save this, but doing so requires loading the list of plugins, |
434 // so do it after a minute as to not impact startup performance. Note that | 434 // so do it after a minute as to not impact startup performance. Note that |
435 // plugins are loaded after 30s by the metrics service. | 435 // plugins are loaded after 30s by the metrics service. |
436 BrowserThread::PostDelayedTask( | 436 BrowserThread::PostDelayedTask( |
437 BrowserThread::FILE, | 437 BrowserThread::FILE, |
438 FROM_HERE, | 438 FROM_HERE, |
439 base::Bind(&PluginPrefs::GetPreferencesDataOnFileThread, this), | 439 base::Bind(&PluginPrefs::GetPreferencesDataOnFileThread, this), |
440 base::TimeDelta::FromMilliseconds(kPluginUpdateDelayMs)); | 440 kPluginUpdateDelayMs); |
441 } | 441 } |
442 | 442 |
443 NotifyPluginStatusChanged(); | 443 NotifyPluginStatusChanged(); |
444 } | 444 } |
445 | 445 |
446 void PluginPrefs::ShutdownOnUIThread() { | 446 void PluginPrefs::ShutdownOnUIThread() { |
447 prefs_ = NULL; | 447 prefs_ = NULL; |
448 registrar_.RemoveAll(); | 448 registrar_.RemoveAll(); |
449 } | 449 } |
450 | 450 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 } | 529 } |
530 } | 530 } |
531 | 531 |
532 void PluginPrefs::NotifyPluginStatusChanged() { | 532 void PluginPrefs::NotifyPluginStatusChanged() { |
533 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 533 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
534 content::NotificationService::current()->Notify( | 534 content::NotificationService::current()->Notify( |
535 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 535 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
536 content::Source<Profile>(profile_), | 536 content::Source<Profile>(profile_), |
537 content::NotificationService::NoDetails()); | 537 content::NotificationService::NoDetails()); |
538 } | 538 } |
OLD | NEW |