OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/win/mtp_device_operations_util.h" | 5 #include "chrome/browser/media_galleries/win/mtp_device_operations_util.h" |
6 | 6 |
7 #include <portabledevice.h> | 7 #include <portabledevice.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <limits> | 11 #include <limits> |
12 | 12 |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/numerics/safe_conversions.h" | 17 #include "base/numerics/safe_conversions.h" |
17 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
18 #include "base/threading/thread_restrictions.h" | 19 #include "base/threading/thread_restrictions.h" |
19 #include "base/time/time.h" | 20 #include "base/time/time.h" |
20 #include "base/win/scoped_co_mem.h" | 21 #include "base/win/scoped_co_mem.h" |
21 #include "base/win/scoped_propvariant.h" | 22 #include "base/win/scoped_propvariant.h" |
22 #include "chrome/common/chrome_constants.h" | 23 #include "chrome/common/chrome_constants.h" |
23 | 24 |
24 namespace media_transfer_protocol { | 25 namespace media_transfer_protocol { |
25 | 26 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 object_entries.empty()) | 409 object_entries.empty()) |
409 return base::string16(); | 410 return base::string16(); |
410 // TODO(thestig): This DCHECK can fail. Multiple MTP objects can have | 411 // TODO(thestig): This DCHECK can fail. Multiple MTP objects can have |
411 // the same name. Handle the situation gracefully. Refer to crbug.com/169930 | 412 // the same name. Handle the situation gracefully. Refer to crbug.com/169930 |
412 // for more details. | 413 // for more details. |
413 DCHECK_EQ(1U, object_entries.size()); | 414 DCHECK_EQ(1U, object_entries.size()); |
414 return object_entries[0].object_id; | 415 return object_entries[0].object_id; |
415 } | 416 } |
416 | 417 |
417 } // namespace media_transfer_protocol | 418 } // namespace media_transfer_protocol |
OLD | NEW |