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

Side by Side Diff: content/common/media/cdm_host_files.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/common/media/cdm_host_files.h" 5 #include "content/common/media/cdm_host_files.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (plugin.is_internal) 91 if (plugin.is_internal)
92 continue; 92 continue;
93 93
94 if (IsCdm(plugin.path)) 94 if (IsCdm(plugin.path))
95 cdm_adapter_paths->push_back(plugin.path); 95 cdm_adapter_paths->push_back(plugin.path);
96 } 96 }
97 } 97 }
98 98
99 // A global instance used on platforms where we have to open the files in the 99 // A global instance used on platforms where we have to open the files in the
100 // Zygote process. 100 // Zygote process.
101 base::LazyInstance<std::unique_ptr<CdmHostFiles>> g_cdm_host_files = 101 base::LazyInstance<std::unique_ptr<CdmHostFiles>>::DestructorAtExit
102 LAZY_INSTANCE_INITIALIZER; 102 g_cdm_host_files = LAZY_INSTANCE_INITIALIZER;
103 #endif 103 #endif
104 104
105 } // namespace 105 } // namespace
106 106
107 CdmHostFiles::CdmHostFiles() { 107 CdmHostFiles::CdmHostFiles() {
108 DVLOG(1) << __func__; 108 DVLOG(1) << __func__;
109 } 109 }
110 110
111 CdmHostFiles::~CdmHostFiles() { 111 CdmHostFiles::~CdmHostFiles() {
112 DVLOG(1) << __func__; 112 DVLOG(1) << __func__;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 cdm_specific_files_map_.clear(); 329 cdm_specific_files_map_.clear();
330 } 330 }
331 331
332 // Question(xhwang): Any better way to check whether a plugin is a CDM? Maybe 332 // Question(xhwang): Any better way to check whether a plugin is a CDM? Maybe
333 // when we register the plugin we can set some flag explicitly? 333 // when we register the plugin we can set some flag explicitly?
334 bool IsCdm(const base::FilePath& cdm_adapter_path) { 334 bool IsCdm(const base::FilePath& cdm_adapter_path) {
335 return !GetCdmPath(cdm_adapter_path).empty(); 335 return !GetCdmPath(cdm_adapter_path).empty();
336 } 336 }
337 337
338 } // namespace content 338 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698