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/linux/mtp_device_delegate_impl_linux.h" | 5 #include "chrome/browser/media_galleries/linux/mtp_device_delegate_impl_linux.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 bool DeleteChild(uint32 file_id); | 388 bool DeleteChild(uint32 file_id); |
389 | 389 |
390 bool HasChildren() const; | 390 bool HasChildren() const; |
391 | 391 |
392 uint32 file_id() const { return file_id_; } | 392 uint32 file_id() const { return file_id_; } |
393 const std::string& file_name() const { return file_name_; } | 393 const std::string& file_name() const { return file_name_; } |
394 MTPFileNode* parent() { return parent_; } | 394 MTPFileNode* parent() { return parent_; } |
395 | 395 |
396 private: | 396 private: |
397 // Container for holding a node's children. | 397 // Container for holding a node's children. |
398 typedef base::ScopedPtrHashMap<std::string, MTPFileNode> ChildNodes; | 398 typedef base::ScopedPtrHashMap<std::string, scoped_ptr<MTPFileNode>> |
| 399 ChildNodes; |
399 | 400 |
400 const uint32 file_id_; | 401 const uint32 file_id_; |
401 const std::string file_name_; | 402 const std::string file_name_; |
402 | 403 |
403 ChildNodes children_; | 404 ChildNodes children_; |
404 MTPFileNode* const parent_; | 405 MTPFileNode* const parent_; |
405 FileIdToMTPFileNodeMap* file_id_to_node_map_; | 406 FileIdToMTPFileNodeMap* file_id_to_node_map_; |
406 | 407 |
407 DISALLOW_COPY_AND_ASSIGN(MTPFileNode); | 408 DISALLOW_COPY_AND_ASSIGN(MTPFileNode); |
408 }; | 409 }; |
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 } | 1903 } |
1903 } | 1904 } |
1904 | 1905 |
1905 void CreateMTPDeviceAsyncDelegate( | 1906 void CreateMTPDeviceAsyncDelegate( |
1906 const std::string& device_location, | 1907 const std::string& device_location, |
1907 const bool read_only, | 1908 const bool read_only, |
1908 const CreateMTPDeviceAsyncDelegateCallback& callback) { | 1909 const CreateMTPDeviceAsyncDelegateCallback& callback) { |
1909 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 1910 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
1910 callback.Run(new MTPDeviceDelegateImplLinux(device_location, read_only)); | 1911 callback.Run(new MTPDeviceDelegateImplLinux(device_location, read_only)); |
1911 } | 1912 } |
OLD | NEW |