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

Side by Side Diff: chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again 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 (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/media_galleries/fileapi/mtp_device_map_service.h" 5 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h" 11 #include "chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "storage/browser/fileapi/external_mount_points.h" 13 #include "storage/browser/fileapi/external_mount_points.h"
14 14
15 namespace { 15 namespace {
16 16
17 base::LazyInstance<MTPDeviceMapService> g_mtp_device_map_service = 17 base::LazyInstance<MTPDeviceMapService>::DestructorAtExit
18 LAZY_INSTANCE_INITIALIZER; 18 g_mtp_device_map_service = LAZY_INSTANCE_INITIALIZER;
19 19
20 } // namespace 20 } // namespace
21 21
22 // static 22 // static
23 MTPDeviceMapService* MTPDeviceMapService::GetInstance() { 23 MTPDeviceMapService* MTPDeviceMapService::GetInstance() {
24 return g_mtp_device_map_service.Pointer(); 24 return g_mtp_device_map_service.Pointer();
25 } 25 }
26 26
27 void MTPDeviceMapService::RegisterMTPFileSystem( 27 void MTPDeviceMapService::RegisterMTPFileSystem(
28 const base::FilePath::StringType& device_location, 28 const base::FilePath::StringType& device_location,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 ? async_delegate_map_it->second 144 ? async_delegate_map_it->second
145 : NULL; 145 : NULL;
146 } 146 }
147 147
148 MTPDeviceMapService::MTPDeviceMapService() { 148 MTPDeviceMapService::MTPDeviceMapService() {
149 } 149 }
150 150
151 MTPDeviceMapService::~MTPDeviceMapService() { 151 MTPDeviceMapService::~MTPDeviceMapService() {
152 DCHECK(mtp_device_usage_map_.empty()); 152 DCHECK(mtp_device_usage_map_.empty());
153 } 153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698