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

Side by Side Diff: webkit/plugins/npapi/plugin_list.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
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 "webkit/plugins/npapi/plugin_list.h" 5 #include "webkit/plugins/npapi/plugin_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/string_split.h" 12 #include "base/string_split.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "net/base/mime_util.h" 17 #include "net/base/mime_util.h"
18 #include "webkit/glue/webkit_glue.h" 18 #include "webkit/glue/webkit_glue.h"
19 #include "webkit/plugins/npapi/plugin_constants_win.h" 19 #include "webkit/plugins/npapi/plugin_constants_win.h"
20 #include "webkit/plugins/npapi/plugin_lib.h" 20 #include "webkit/plugins/npapi/plugin_lib.h"
21 #include "webkit/plugins/plugin_switches.h" 21 #include "webkit/plugins/plugin_switches.h"
22 22
23 namespace { 23 namespace {
24 24
25 static const char kApplicationOctetStream[] = "application/octet-stream"; 25 static const char kApplicationOctetStream[] = "application/octet-stream";
26 26
27 base::LazyInstance<webkit::npapi::PluginList> g_singleton( 27 base::LazyInstance<webkit::npapi::PluginList> g_singleton =
28 base::LINKER_INITIALIZED); 28 LAZY_INSTANCE_INITIALIZER;
29 29
30 bool AllowMimeTypeMismatch(const std::string& orig_mime_type, 30 bool AllowMimeTypeMismatch(const std::string& orig_mime_type,
31 const std::string& actual_mime_type) { 31 const std::string& actual_mime_type) {
32 if (orig_mime_type == actual_mime_type) { 32 if (orig_mime_type == actual_mime_type) {
33 NOTREACHED(); 33 NOTREACHED();
34 return true; 34 return true;
35 } 35 }
36 36
37 // We do not permit URL-sniff based plug-in MIME type overrides aside from 37 // We do not permit URL-sniff based plug-in MIME type overrides aside from
38 // the case where the "type" was initially missing or generic 38 // the case where the "type" was initially missing or generic
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 } 748 }
749 return false; 749 return false;
750 } 750 }
751 751
752 PluginList::~PluginList() { 752 PluginList::~PluginList() {
753 } 753 }
754 754
755 755
756 } // namespace npapi 756 } // namespace npapi
757 } // namespace webkit 757 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698