| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/linux/mtp_device_task_helper_map_servic
e.h" | 5 #include "chrome/browser/media_galleries/linux/mtp_device_task_helper_map_servic
e.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "chrome/browser/media_galleries/linux/mtp_device_task_helper.h" | 9 #include "chrome/browser/media_galleries/linux/mtp_device_task_helper.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 11 | 11 |
| 12 namespace chrome { | |
| 13 | |
| 14 namespace { | 12 namespace { |
| 15 | 13 |
| 16 base::LazyInstance<MTPDeviceTaskHelperMapService> | 14 base::LazyInstance<MTPDeviceTaskHelperMapService> |
| 17 g_mtp_device_task_helper_map_service = LAZY_INSTANCE_INITIALIZER; | 15 g_mtp_device_task_helper_map_service = LAZY_INSTANCE_INITIALIZER; |
| 18 | 16 |
| 19 } // namespace | 17 } // namespace |
| 20 | 18 |
| 21 // static | 19 // static |
| 22 MTPDeviceTaskHelperMapService* MTPDeviceTaskHelperMapService::GetInstance() { | 20 MTPDeviceTaskHelperMapService* MTPDeviceTaskHelperMapService::GetInstance() { |
| 23 return g_mtp_device_task_helper_map_service.Pointer(); | 21 return g_mtp_device_task_helper_map_service.Pointer(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 49 DCHECK(!storage_name.empty()); | 47 DCHECK(!storage_name.empty()); |
| 50 TaskHelperMap::const_iterator it = task_helper_map_.find(storage_name); | 48 TaskHelperMap::const_iterator it = task_helper_map_.find(storage_name); |
| 51 return (it != task_helper_map_.end()) ? it->second : NULL; | 49 return (it != task_helper_map_.end()) ? it->second : NULL; |
| 52 } | 50 } |
| 53 | 51 |
| 54 MTPDeviceTaskHelperMapService::MTPDeviceTaskHelperMapService() { | 52 MTPDeviceTaskHelperMapService::MTPDeviceTaskHelperMapService() { |
| 55 } | 53 } |
| 56 | 54 |
| 57 MTPDeviceTaskHelperMapService::~MTPDeviceTaskHelperMapService() { | 55 MTPDeviceTaskHelperMapService::~MTPDeviceTaskHelperMapService() { |
| 58 } | 56 } |
| 59 | |
| 60 } // namespace chrome | |
| OLD | NEW |