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/ui/webui/options/media_galleries_handler.h" | 5 #include "chrome/browser/ui/webui/options/media_galleries_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" |
11 #include "chrome/browser/media_galleries/media_file_system_registry.h" | 12 #include "chrome/browser/media_galleries/media_file_system_registry.h" |
12 #include "chrome/browser/media_galleries/media_galleries_preferences.h" | 13 #include "chrome/browser/media_galleries/media_galleries_preferences.h" |
13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/storage_monitor/storage_monitor.h" | 15 #include "chrome/browser/storage_monitor/storage_monitor.h" |
15 #include "chrome/browser/ui/chrome_select_file_policy.h" | 16 #include "chrome/browser/ui/chrome_select_file_policy.h" |
16 #include "chrome/common/chrome_notification_types.h" | |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "content/public/browser/notification_details.h" | 18 #include "content/public/browser/notification_details.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "content/public/browser/web_contents_view.h" | 20 #include "content/public/browser/web_contents_view.h" |
21 #include "content/public/browser/web_ui.h" | 21 #include "content/public/browser/web_ui.h" |
22 #include "grit/generated_resources.h" | 22 #include "grit/generated_resources.h" |
23 | 23 |
24 namespace options { | 24 namespace options { |
25 | 25 |
26 using chrome::MediaGalleriesPreferences; | 26 using chrome::MediaGalleriesPreferences; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 int index, | 149 int index, |
150 void* params) { | 150 void* params) { |
151 DCHECK(chrome::StorageMonitor::GetInstance()->IsInitialized()); | 151 DCHECK(chrome::StorageMonitor::GetInstance()->IsInitialized()); |
152 chrome::MediaGalleriesPreferences* preferences = | 152 chrome::MediaGalleriesPreferences* preferences = |
153 g_browser_process->media_file_system_registry()->GetPreferences( | 153 g_browser_process->media_file_system_registry()->GetPreferences( |
154 Profile::FromWebUI(web_ui())); | 154 Profile::FromWebUI(web_ui())); |
155 preferences->AddGalleryByPath(path); | 155 preferences->AddGalleryByPath(path); |
156 } | 156 } |
157 | 157 |
158 } // namespace options | 158 } // namespace options |
OLD | NEW |