| 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 // MediaFileSystemRegistry implementation. | 5 // MediaFileSystemRegistry implementation. |
| 6 | 6 |
| 7 #include "chrome/browser/media_gallery/media_file_system_registry.h" | 7 #include "chrome/browser/media_gallery/media_file_system_registry.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/file_path.h" | 15 #include "base/file_path.h" |
| 16 #include "base/json/json_writer.h" | 16 #include "base/json/json_writer.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/prefs/pref_service.h" |
| 18 #include "base/stl_util.h" | 19 #include "base/stl_util.h" |
| 19 #include "base/string_number_conversions.h" | 20 #include "base/string_number_conversions.h" |
| 20 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 21 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
| 22 #include "base/values.h" | 23 #include "base/values.h" |
| 23 #include "chrome/browser/extensions/extension_service.h" | 24 #include "chrome/browser/extensions/extension_service.h" |
| 24 #include "chrome/browser/extensions/extension_system.h" | 25 #include "chrome/browser/extensions/extension_system.h" |
| 25 #include "chrome/browser/media_gallery/media_file_system_context.h" | 26 #include "chrome/browser/media_gallery/media_file_system_context.h" |
| 26 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h" | 27 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h" |
| 27 #include "chrome/browser/media_gallery/scoped_mtp_device_map_entry.h" | 28 #include "chrome/browser/media_gallery/scoped_mtp_device_map_entry.h" |
| 28 #include "chrome/browser/prefs/pref_service.h" | |
| 29 #include "chrome/browser/profiles/profile.h" | 29 #include "chrome/browser/profiles/profile.h" |
| 30 #include "chrome/browser/system_monitor/media_storage_util.h" | 30 #include "chrome/browser/system_monitor/media_storage_util.h" |
| 31 #include "chrome/browser/system_monitor/removable_storage_notifications.h" | 31 #include "chrome/browser/system_monitor/removable_storage_notifications.h" |
| 32 #include "chrome/common/chrome_notification_types.h" | 32 #include "chrome/common/chrome_notification_types.h" |
| 33 #include "chrome/common/chrome_paths.h" | 33 #include "chrome/common/chrome_paths.h" |
| 34 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
| 35 #include "chrome/common/extensions/extension.h" |
| 35 #include "chrome/common/extensions/extension_constants.h" | 36 #include "chrome/common/extensions/extension_constants.h" |
| 36 #include "chrome/common/extensions/extension_set.h" | 37 #include "chrome/common/extensions/extension_set.h" |
| 37 #include "chrome/common/extensions/extension.h" | |
| 38 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
| 39 #include "content/public/browser/browser_thread.h" | 39 #include "content/public/browser/browser_thread.h" |
| 40 #include "content/public/browser/notification_details.h" | 40 #include "content/public/browser/notification_details.h" |
| 41 #include "content/public/browser/notification_observer.h" | 41 #include "content/public/browser/notification_observer.h" |
| 42 #include "content/public/browser/notification_registrar.h" | 42 #include "content/public/browser/notification_registrar.h" |
| 43 #include "content/public/browser/notification_source.h" | 43 #include "content/public/browser/notification_source.h" |
| 44 #include "content/public/browser/notification_types.h" | 44 #include "content/public/browser/notification_types.h" |
| 45 #include "content/public/browser/render_process_host.h" | 45 #include "content/public/browser/render_process_host.h" |
| 46 #include "content/public/browser/render_view_host.h" | 46 #include "content/public/browser/render_view_host.h" |
| 47 #include "content/public/browser/web_contents.h" | 47 #include "content/public/browser/web_contents.h" |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 | 807 |
| 808 PrefChangeRegistrarMap::iterator pref_it = | 808 PrefChangeRegistrarMap::iterator pref_it = |
| 809 pref_change_registrar_map_.find(profile); | 809 pref_change_registrar_map_.find(profile); |
| 810 DCHECK(pref_it != pref_change_registrar_map_.end()); | 810 DCHECK(pref_it != pref_change_registrar_map_.end()); |
| 811 delete pref_it->second; | 811 delete pref_it->second; |
| 812 pref_change_registrar_map_.erase(pref_it); | 812 pref_change_registrar_map_.erase(pref_it); |
| 813 } | 813 } |
| 814 } | 814 } |
| 815 | 815 |
| 816 } // namespace chrome | 816 } // namespace chrome |
| OLD | NEW |