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/media_file_system_registry.h" | 5 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
16 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" | 16 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" |
17 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h" | 17 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h" |
18 #include "chrome/browser/media_galleries/gallery_watch_manager.h" | 18 #include "chrome/browser/media_galleries/gallery_watch_manager.h" |
19 #include "chrome/browser/media_galleries/imported_media_gallery_registry.h" | 19 #include "chrome/browser/media_galleries/imported_media_gallery_registry.h" |
20 #include "chrome/browser/media_galleries/media_file_system_context.h" | 20 #include "chrome/browser/media_galleries/media_file_system_context.h" |
21 #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" | 21 #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" |
22 #include "chrome/browser/media_galleries/media_galleries_histograms.h" | 22 #include "chrome/browser/media_galleries/media_galleries_histograms.h" |
23 #include "chrome/browser/media_galleries/media_galleries_preferences_factory.h" | 23 #include "chrome/browser/media_galleries/media_galleries_preferences_factory.h" |
24 #include "chrome/browser/media_galleries/media_scan_manager.h" | 24 #include "chrome/browser/media_galleries/media_scan_manager.h" |
25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/common/chrome_paths.h" | 26 #include "chrome/common/chrome_paths.h" |
27 #include "chrome/common/extensions/extension_constants.h" | 27 #include "chrome/common/extensions/extension_constants.h" |
28 #include "chrome/common/pref_names.h" | |
29 #include "components/storage_monitor/media_storage_util.h" | 28 #include "components/storage_monitor/media_storage_util.h" |
30 #include "components/storage_monitor/storage_monitor.h" | 29 #include "components/storage_monitor/storage_monitor.h" |
31 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
32 #include "content/public/browser/navigation_details.h" | 31 #include "content/public/browser/navigation_details.h" |
33 #include "content/public/browser/render_process_host.h" | 32 #include "content/public/browser/render_process_host.h" |
34 #include "content/public/browser/render_process_host_observer.h" | 33 #include "content/public/browser/render_process_host_observer.h" |
35 #include "content/public/browser/render_view_host.h" | 34 #include "content/public/browser/render_view_host.h" |
36 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
37 #include "content/public/browser/web_contents_observer.h" | 36 #include "content/public/browser/web_contents_observer.h" |
38 #include "extensions/browser/extension_system.h" | 37 #include "extensions/browser/extension_system.h" |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 DCHECK_EQ(1U, erase_count); | 838 DCHECK_EQ(1U, erase_count); |
840 if (extension_hosts->second.empty()) { | 839 if (extension_hosts->second.empty()) { |
841 // When a profile has no ExtensionGalleriesHosts left, remove the | 840 // When a profile has no ExtensionGalleriesHosts left, remove the |
842 // matching gallery-change-watcher since it is no longer needed. Leave the | 841 // matching gallery-change-watcher since it is no longer needed. Leave the |
843 // |extension_hosts| entry alone, since it indicates the profile has been | 842 // |extension_hosts| entry alone, since it indicates the profile has been |
844 // previously used. | 843 // previously used. |
845 MediaGalleriesPreferences* preferences = GetPreferences(profile); | 844 MediaGalleriesPreferences* preferences = GetPreferences(profile); |
846 preferences->RemoveGalleryChangeObserver(this); | 845 preferences->RemoveGalleryChangeObserver(this); |
847 } | 846 } |
848 } | 847 } |
OLD | NEW |