| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/extensions/file_manager_util.h" | 4 #include "chrome/browser/extensions/file_manager_util.h" |
| 5 | 5 |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/plugin_prefs.h" | 14 #include "chrome/browser/plugin_prefs.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/simple_message_box.h" | 16 #include "chrome/browser/simple_message_box.h" |
| 17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
| 18 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
| 19 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 20 #include "chrome/common/chrome_paths.h" | 20 #include "chrome/common/chrome_paths.h" |
| 21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
| 22 #include "content/browser/plugin_service.h" | |
| 23 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/browser/plugin_service.h" |
| 24 #include "content/public/browser/user_metrics.h" | 24 #include "content/public/browser/user_metrics.h" |
| 25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
| 26 #include "net/base/escape.h" | 26 #include "net/base/escape.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 28 #include "webkit/fileapi/file_system_context.h" | 28 #include "webkit/fileapi/file_system_context.h" |
| 29 #include "webkit/fileapi/file_system_mount_point_provider.h" | 29 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 30 #include "webkit/fileapi/file_system_util.h" | 30 #include "webkit/fileapi/file_system_util.h" |
| 31 #include "webkit/plugins/webplugininfo.h" |
| 31 | 32 |
| 32 #if defined(OS_CHROMEOS) | 33 #if defined(OS_CHROMEOS) |
| 33 #include "chrome/browser/chromeos/media/media_player.h" | 34 #include "chrome/browser/chromeos/media/media_player.h" |
| 34 #endif | 35 #endif |
| 35 | 36 |
| 36 using content::BrowserThread; | 37 using content::BrowserThread; |
| 38 using content::PluginService; |
| 37 using content::UserMetricsAction; | 39 using content::UserMetricsAction; |
| 38 | 40 |
| 39 #define FILEBROWSER_DOMAIN "hhaomjibdihmijegdhdafkllkbggdgoj" | 41 #define FILEBROWSER_DOMAIN "hhaomjibdihmijegdhdafkllkbggdgoj" |
| 40 const char kFileBrowserDomain[] = FILEBROWSER_DOMAIN; | 42 const char kFileBrowserDomain[] = FILEBROWSER_DOMAIN; |
| 41 | 43 |
| 42 namespace file_manager_util { | 44 namespace file_manager_util { |
| 43 namespace { | 45 namespace { |
| 44 | 46 |
| 45 #define FILEBROWSER_URL(PATH) \ | 47 #define FILEBROWSER_URL(PATH) \ |
| 46 ("chrome-extension://" FILEBROWSER_DOMAIN "/" PATH) | 48 ("chrome-extension://" FILEBROWSER_DOMAIN "/" PATH) |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 kUMATrackingExtensions, | 344 kUMATrackingExtensions, |
| 343 arraysize(kUMATrackingExtensions)); | 345 arraysize(kUMATrackingExtensions)); |
| 344 UMA_HISTOGRAM_ENUMERATION("FileBrowser.OpeningFileType", | 346 UMA_HISTOGRAM_ENUMERATION("FileBrowser.OpeningFileType", |
| 345 extension_index, | 347 extension_index, |
| 346 arraysize(kUMATrackingExtensions) - 1); | 348 arraysize(kUMATrackingExtensions) - 1); |
| 347 return false; | 349 return false; |
| 348 } | 350 } |
| 349 | 351 |
| 350 } // namespace file_manager_util | 352 } // namespace file_manager_util |
| 351 | 353 |
| OLD | NEW |