| 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/chromeos/mtp_device_task_helper_map_ser
vice.h" | 5 #include "chrome/browser/media_galleries/chromeos/mtp_device_task_helper_map_ser
vice.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/chromeos/mtp_device_task_helper.h" | 9 #include "chrome/browser/media_galleries/chromeos/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 { | 12 namespace { |
| 13 | 13 |
| 14 base::LazyInstance<MTPDeviceTaskHelperMapService> | 14 base::LazyInstance<MTPDeviceTaskHelperMapService>::DestructorAtExit |
| 15 g_mtp_device_task_helper_map_service = LAZY_INSTANCE_INITIALIZER; | 15 g_mtp_device_task_helper_map_service = LAZY_INSTANCE_INITIALIZER; |
| 16 | 16 |
| 17 } // namespace | 17 } // namespace |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 MTPDeviceTaskHelperMapService* MTPDeviceTaskHelperMapService::GetInstance() { | 20 MTPDeviceTaskHelperMapService* MTPDeviceTaskHelperMapService::GetInstance() { |
| 21 return g_mtp_device_task_helper_map_service.Pointer(); | 21 return g_mtp_device_task_helper_map_service.Pointer(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 MTPDeviceTaskHelper* MTPDeviceTaskHelperMapService::CreateDeviceTaskHelper( | 24 MTPDeviceTaskHelper* MTPDeviceTaskHelperMapService::CreateDeviceTaskHelper( |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const bool read_only) { | 65 const bool read_only) { |
| 66 return (read_only ? "ReadOnly" : "ReadWrite") + std::string("|") + | 66 return (read_only ? "ReadOnly" : "ReadWrite") + std::string("|") + |
| 67 storage_name; | 67 storage_name; |
| 68 } | 68 } |
| 69 | 69 |
| 70 MTPDeviceTaskHelperMapService::MTPDeviceTaskHelperMapService() { | 70 MTPDeviceTaskHelperMapService::MTPDeviceTaskHelperMapService() { |
| 71 } | 71 } |
| 72 | 72 |
| 73 MTPDeviceTaskHelperMapService::~MTPDeviceTaskHelperMapService() { | 73 MTPDeviceTaskHelperMapService::~MTPDeviceTaskHelperMapService() { |
| 74 } | 74 } |
| OLD | NEW |