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

Side by Side Diff: chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc

Issue 2358493002: Remove MTP support on Linux. (Closed)
Patch Set: move files Created 4 years, 2 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/linux/mtp_device_delegate_impl_linux.h" 5 #include "chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chrom eos.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <algorithm> 11 #include <algorithm>
12 #include <limits> 12 #include <limits>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ptr_util.h" 18 #include "base/memory/ptr_util.h"
19 #include "base/numerics/safe_conversions.h" 19 #include "base/numerics/safe_conversions.h"
20 #include "base/posix/eintr_wrapper.h" 20 #include "base/posix/eintr_wrapper.h"
21 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/string_split.h" 22 #include "base/strings/string_split.h"
23 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
24 #include "chrome/browser/media_galleries/linux/mtp_device_task_helper_map_servic e.h" 24 #include "chrome/browser/media_galleries/chromeos/mtp_device_task_helper_map_ser vice.h"
25 #include "chrome/browser/media_galleries/linux/snapshot_file_details.h" 25 #include "chrome/browser/media_galleries/chromeos/snapshot_file_details.h"
26 #include "net/base/io_buffer.h" 26 #include "net/base/io_buffer.h"
27 #include "third_party/cros_system_api/dbus/service_constants.h" 27 #include "third_party/cros_system_api/dbus/service_constants.h"
28 28
29 namespace { 29 namespace {
30 30
31 // File path separator constant. 31 // File path separator constant.
32 const char kRootPath[] = "/"; 32 const char kRootPath[] = "/";
33 33
34 // Returns the device relative file path given |file_path|. 34 // Returns the device relative file path given |file_path|.
35 // E.g.: If the |file_path| is "/usb:2,2:12345/DCIM" and |registered_dev_path| 35 // E.g.: If the |file_path| is "/usb:2,2:12345/DCIM" and |registered_dev_path|
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 } 1890 }
1891 } 1891 }
1892 1892
1893 void CreateMTPDeviceAsyncDelegate( 1893 void CreateMTPDeviceAsyncDelegate(
1894 const std::string& device_location, 1894 const std::string& device_location,
1895 const bool read_only, 1895 const bool read_only,
1896 const CreateMTPDeviceAsyncDelegateCallback& callback) { 1896 const CreateMTPDeviceAsyncDelegateCallback& callback) {
1897 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); 1897 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
1898 callback.Run(new MTPDeviceDelegateImplLinux(device_location, read_only)); 1898 callback.Run(new MTPDeviceDelegateImplLinux(device_location, read_only));
1899 } 1899 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698