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

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

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase Created 9 years, 1 month 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/internal_auth.cc ('k') | chrome/browser/printing/printing_message_filter.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_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 23 matching lines...) Expand all
34 #include "webkit/plugins/npapi/plugin_group.h" 34 #include "webkit/plugins/npapi/plugin_group.h"
35 #include "webkit/plugins/npapi/plugin_list.h" 35 #include "webkit/plugins/npapi/plugin_list.h"
36 #include "webkit/plugins/webplugininfo.h" 36 #include "webkit/plugins/webplugininfo.h"
37 37
38 using content::BrowserThread; 38 using content::BrowserThread;
39 39
40 namespace { 40 namespace {
41 41
42 // Default state for a plug-in (not state of the default plug-in!). 42 // Default state for a plug-in (not state of the default plug-in!).
43 // Accessed only on the UI thread. 43 // Accessed only on the UI thread.
44 base::LazyInstance<std::map<FilePath, bool> > g_default_plugin_state( 44 base::LazyInstance<std::map<FilePath, bool> > g_default_plugin_state =
45 base::LINKER_INITIALIZED); 45 LAZY_INSTANCE_INITIALIZER;
46 46
47 } // namespace 47 } // namespace
48 48
49 // How long to wait to save the plugin enabled information, which might need to 49 // How long to wait to save the plugin enabled information, which might need to
50 // go to disk. 50 // go to disk.
51 #define kPluginUpdateDelayMs (60 * 1000) 51 #define kPluginUpdateDelayMs (60 * 1000)
52 52
53 // static 53 // static
54 PluginPrefs* PluginPrefs::GetForProfile(Profile* profile) { 54 PluginPrefs* PluginPrefs::GetForProfile(Profile* profile) {
55 PluginPrefsWrapper* wrapper = 55 PluginPrefsWrapper* wrapper =
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 532 }
533 } 533 }
534 534
535 void PluginPrefs::NotifyPluginStatusChanged() { 535 void PluginPrefs::NotifyPluginStatusChanged() {
536 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 536 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
537 content::NotificationService::current()->Notify( 537 content::NotificationService::current()->Notify(
538 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 538 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
539 content::Source<Profile>(profile_), 539 content::Source<Profile>(profile_),
540 content::NotificationService::NoDetails()); 540 content::NotificationService::NoDetails());
541 } 541 }
OLDNEW
« no previous file with comments | « chrome/browser/internal_auth.cc ('k') | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698