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/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 "webkit/browser/fileapi/isolated_context.h" | 12 #include "webkit/browser/fileapi/isolated_context.h" |
13 | 13 |
14 namespace chrome { | |
15 | |
16 namespace { | 14 namespace { |
17 | 15 |
18 base::LazyInstance<MTPDeviceMapService> g_mtp_device_map_service = | 16 base::LazyInstance<MTPDeviceMapService> g_mtp_device_map_service = |
19 LAZY_INSTANCE_INITIALIZER; | 17 LAZY_INSTANCE_INITIALIZER; |
20 | 18 |
21 } // namespace | 19 } // namespace |
22 | 20 |
23 // static | 21 // static |
24 MTPDeviceMapService* MTPDeviceMapService::GetInstance() { | 22 MTPDeviceMapService* MTPDeviceMapService::GetInstance() { |
25 return g_mtp_device_map_service.Pointer(); | 23 return g_mtp_device_map_service.Pointer(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 DCHECK(!device_location.empty()); | 59 DCHECK(!device_location.empty()); |
62 AsyncDelegateMap::const_iterator it = | 60 AsyncDelegateMap::const_iterator it = |
63 async_delegate_map_.find(device_location); | 61 async_delegate_map_.find(device_location); |
64 return (it != async_delegate_map_.end()) ? it->second : NULL; | 62 return (it != async_delegate_map_.end()) ? it->second : NULL; |
65 } | 63 } |
66 | 64 |
67 | 65 |
68 MTPDeviceMapService::MTPDeviceMapService() { | 66 MTPDeviceMapService::MTPDeviceMapService() { |
69 } | 67 } |
70 | 68 |
71 MTPDeviceMapService::~MTPDeviceMapService() {} | 69 MTPDeviceMapService::~MTPDeviceMapService() { |
72 | 70 } |
73 } // namespace chrome | |
OLD | NEW |