| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
| 14 #include "chrome/browser/extensions/extension_system.h" | |
| 15 #include "chrome/browser/extensions/test_extension_system.h" | 14 #include "chrome/browser/extensions/test_extension_system.h" |
| 16 #include "chrome/browser/media_galleries/media_file_system_registry.h" | 15 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
| 17 #include "chrome/browser/media_galleries/media_galleries_test_util.h" | 16 #include "chrome/browser/media_galleries/media_galleries_test_util.h" |
| 18 #include "chrome/browser/storage_monitor/storage_info.h" | 17 #include "chrome/browser/storage_monitor/storage_info.h" |
| 19 #include "chrome/browser/storage_monitor/storage_monitor.h" | 18 #include "chrome/browser/storage_monitor/storage_monitor.h" |
| 20 #include "chrome/browser/storage_monitor/test_portable_device_watcher_win.h" | 19 #include "chrome/browser/storage_monitor/test_portable_device_watcher_win.h" |
| 21 #include "chrome/browser/storage_monitor/test_storage_monitor.h" | 20 #include "chrome/browser/storage_monitor/test_storage_monitor.h" |
| 22 #include "chrome/browser/storage_monitor/test_storage_monitor_win.h" | 21 #include "chrome/browser/storage_monitor/test_storage_monitor_win.h" |
| 23 #include "chrome/browser/storage_monitor/test_volume_mount_watcher_win.h" | 22 #include "chrome/browser/storage_monitor/test_volume_mount_watcher_win.h" |
| 24 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 23 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 25 #include "chrome/test/base/testing_browser_process.h" | 24 #include "chrome/test/base/testing_browser_process.h" |
| 26 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
| 27 #include "content/public/browser/render_view_host.h" | 26 #include "content/public/browser/render_view_host.h" |
| 28 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
| 28 #include "extensions/browser/extension_system.h" |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 29 #include "testing/gtest/include/gtest/gtest.h" |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 typedef std::map<MediaGalleryPrefId, MediaFileSystemInfo> FSInfoMap; | 33 typedef std::map<MediaGalleryPrefId, MediaFileSystemInfo> FSInfoMap; |
| 34 | 34 |
| 35 void GetGalleryInfoCallback( | 35 void GetGalleryInfoCallback( |
| 36 FSInfoMap* results, | 36 FSInfoMap* results, |
| 37 const std::vector<MediaFileSystemInfo>& file_systems) { | 37 const std::vector<MediaFileSystemInfo>& file_systems) { |
| 38 for (size_t i = 0; i < file_systems.size(); ++i) { | 38 for (size_t i = 0; i < file_systems.size(); ++i) { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { | 166 for (FSInfoMap::iterator i = results.begin(); i != results.end(); ++i) { |
| 167 MediaFileSystemInfo info = i->second; | 167 MediaFileSystemInfo info = i->second; |
| 168 if (info.path == location) { | 168 if (info.path == location) { |
| 169 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); | 169 CheckGalleryInfo(info, location.LossyDisplayName(), location, true, true); |
| 170 checked = true; | 170 checked = true; |
| 171 break; | 171 break; |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 EXPECT_TRUE(checked); | 174 EXPECT_TRUE(checked); |
| 175 } | 175 } |
| OLD | NEW |