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

Unified Diff: chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.cc

Issue 2358493002: Remove MTP support on Linux. (Closed)
Patch Set: move files Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.cc
diff --git a/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.cc b/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.cc
deleted file mode 100644
index dd054d4bd876b776a5815f4d66811677135c91fa..0000000000000000000000000000000000000000
--- a/chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/media_galleries/linux/mtp_device_task_helper_map_service.h"
-
-#include "base/logging.h"
-#include "base/stl_util.h"
-#include "chrome/browser/media_galleries/linux/mtp_device_task_helper.h"
-#include "content/public/browser/browser_thread.h"
-
-namespace {
-
-base::LazyInstance<MTPDeviceTaskHelperMapService>
- g_mtp_device_task_helper_map_service = LAZY_INSTANCE_INITIALIZER;
-
-} // namespace
-
-// static
-MTPDeviceTaskHelperMapService* MTPDeviceTaskHelperMapService::GetInstance() {
- return g_mtp_device_task_helper_map_service.Pointer();
-}
-
-MTPDeviceTaskHelper* MTPDeviceTaskHelperMapService::CreateDeviceTaskHelper(
- const std::string& storage_name,
- const bool read_only) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- DCHECK(!storage_name.empty());
- const MTPDeviceTaskHelperKey key =
- GetMTPDeviceTaskHelperKey(storage_name, read_only);
- DCHECK(!base::ContainsKey(task_helper_map_, key));
- MTPDeviceTaskHelper* task_helper = new MTPDeviceTaskHelper();
- task_helper_map_[key] = task_helper;
- return task_helper;
-}
-
-void MTPDeviceTaskHelperMapService::DestroyDeviceTaskHelper(
- const std::string& storage_name,
- const bool read_only) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- const MTPDeviceTaskHelperKey key =
- GetMTPDeviceTaskHelperKey(storage_name, read_only);
- TaskHelperMap::iterator it = task_helper_map_.find(key);
- if (it == task_helper_map_.end())
- return;
- delete it->second;
- task_helper_map_.erase(it);
-}
-
-MTPDeviceTaskHelper* MTPDeviceTaskHelperMapService::GetDeviceTaskHelper(
- const std::string& storage_name,
- const bool read_only) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- DCHECK(!storage_name.empty());
- const MTPDeviceTaskHelperKey key =
- GetMTPDeviceTaskHelperKey(storage_name, read_only);
- TaskHelperMap::const_iterator it = task_helper_map_.find(key);
- return (it != task_helper_map_.end()) ? it->second : NULL;
-}
-
-// static
-MTPDeviceTaskHelperMapService::MTPDeviceTaskHelperKey
-MTPDeviceTaskHelperMapService::GetMTPDeviceTaskHelperKey(
- const std::string& storage_name,
- const bool read_only) {
- return (read_only ? "ReadOnly" : "ReadWrite") + std::string("|") +
- storage_name;
-}
-
-MTPDeviceTaskHelperMapService::MTPDeviceTaskHelperMapService() {
-}
-
-MTPDeviceTaskHelperMapService::~MTPDeviceTaskHelperMapService() {
-}

Powered by Google App Engine
This is Rietveld 408576698