Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chrome/browser/media_galleries/media_file_system_registry.cc

Issue 15239002: Move Extension and PermissionsData to extensions/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_galleries/media_file_system_registry.h" 7 #include "chrome/browser/media_galleries/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/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/prefs/pref_service.h" 15 #include "base/prefs/pref_service.h"
16 #include "base/stl_util.h" 16 #include "base/stl_util.h"
17 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
18 #include "chrome/browser/extensions/extension_service.h" 18 #include "chrome/browser/extensions/extension_service.h"
19 #include "chrome/browser/extensions/extension_system.h" 19 #include "chrome/browser/extensions/extension_system.h"
20 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h" 20 #include "chrome/browser/media_galleries/fileapi/mtp_device_map_service.h"
21 #include "chrome/browser/media_galleries/imported_media_gallery_registry.h" 21 #include "chrome/browser/media_galleries/imported_media_gallery_registry.h"
22 #include "chrome/browser/media_galleries/media_file_system_context.h" 22 #include "chrome/browser/media_galleries/media_file_system_context.h"
23 #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" 23 #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h"
24 #include "chrome/browser/media_galleries/media_galleries_histograms.h" 24 #include "chrome/browser/media_galleries/media_galleries_histograms.h"
25 #include "chrome/browser/media_galleries/media_galleries_preferences_factory.h" 25 #include "chrome/browser/media_galleries/media_galleries_preferences_factory.h"
26 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/storage_monitor/media_storage_util.h" 27 #include "chrome/browser/storage_monitor/media_storage_util.h"
28 #include "chrome/browser/storage_monitor/storage_monitor.h" 28 #include "chrome/browser/storage_monitor/storage_monitor.h"
29 #include "chrome/common/chrome_paths.h" 29 #include "chrome/common/chrome_paths.h"
30 #include "chrome/common/extensions/extension.h"
31 #include "chrome/common/extensions/extension_constants.h" 30 #include "chrome/common/extensions/extension_constants.h"
32 #include "chrome/common/extensions/extension_set.h" 31 #include "chrome/common/extensions/extension_set.h"
33 #include "chrome/common/pref_names.h" 32 #include "chrome/common/pref_names.h"
34 #include "content/public/browser/browser_thread.h" 33 #include "content/public/browser/browser_thread.h"
35 #include "content/public/browser/navigation_details.h" 34 #include "content/public/browser/navigation_details.h"
36 #include "content/public/browser/notification_details.h" 35 #include "content/public/browser/notification_details.h"
37 #include "content/public/browser/notification_observer.h" 36 #include "content/public/browser/notification_observer.h"
38 #include "content/public/browser/notification_registrar.h" 37 #include "content/public/browser/notification_registrar.h"
39 #include "content/public/browser/notification_source.h" 38 #include "content/public/browser/notification_source.h"
40 #include "content/public/browser/notification_types.h" 39 #include "content/public/browser/notification_types.h"
41 #include "content/public/browser/render_process_host.h" 40 #include "content/public/browser/render_process_host.h"
42 #include "content/public/browser/render_view_host.h" 41 #include "content/public/browser/render_view_host.h"
43 #include "content/public/browser/web_contents.h" 42 #include "content/public/browser/web_contents.h"
43 #include "extensions/common/extension.h"
44 #include "webkit/browser/fileapi/isolated_context.h" 44 #include "webkit/browser/fileapi/isolated_context.h"
45 #include "webkit/common/fileapi/file_system_types.h" 45 #include "webkit/common/fileapi/file_system_types.h"
46 46
47 using content::BrowserThread; 47 using content::BrowserThread;
48 using content::NavigationController; 48 using content::NavigationController;
49 using content::RenderProcessHost; 49 using content::RenderProcessHost;
50 using content::WebContents; 50 using content::WebContents;
51 using fileapi::IsolatedContext; 51 using fileapi::IsolatedContext;
52 52
53 namespace { 53 namespace {
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 DCHECK_EQ(1U, erase_count); 665 DCHECK_EQ(1U, erase_count);
666 if (extension_hosts->second.empty()) { 666 if (extension_hosts->second.empty()) {
667 // When a profile has no ExtensionGalleriesHosts left, remove the 667 // When a profile has no ExtensionGalleriesHosts left, remove the
668 // matching gallery-change-watcher since it is no longer needed. Leave the 668 // matching gallery-change-watcher since it is no longer needed. Leave the
669 // |extension_hosts| entry alone, since it indicates the profile has been 669 // |extension_hosts| entry alone, since it indicates the profile has been
670 // previously used. 670 // previously used.
671 MediaGalleriesPreferences* preferences = GetPreferences(profile); 671 MediaGalleriesPreferences* preferences = GetPreferences(profile);
672 preferences->RemoveGalleryChangeObserver(this); 672 preferences->RemoveGalleryChangeObserver(this);
673 } 673 }
674 } 674 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698