diff options
author | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 08:28:43 +0000 |
---|---|---|
committer | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 08:28:43 +0000 |
commit | 68adf1888e6e0ccf4088a4d9d60e9e9b798d1023 (patch) | |
tree | 1718fef5336f6e30ad3492b1be23976a46e4badf /chrome/browser/chromeos/file_manager | |
parent | b90727df54af9be1037095be8f046d93e6d922dc (diff) | |
download | chromium_src-68adf1888e6e0ccf4088a4d9d60e9e9b798d1023.zip chromium_src-68adf1888e6e0ccf4088a4d9d60e9e9b798d1023.tar.gz chromium_src-68adf1888e6e0ccf4088a4d9d60e9e9b798d1023.tar.bz2 |
Reland: Misc cleanup in Drive/Files.app C++ code.
BUG=none
Prev Commit: https://src.chromium.org/viewvc/chrome?view=rev&revision=240957
Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=240967
Review URL: https://codereview.chromium.org/116983003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/file_manager')
10 files changed, 12 insertions, 31 deletions
diff --git a/chrome/browser/chromeos/file_manager/app_installer.cc b/chrome/browser/chromeos/file_manager/app_installer.cc index b6580b8..fa4b704 100644 --- a/chrome/browser/chromeos/file_manager/app_installer.cc +++ b/chrome/browser/chromeos/file_manager/app_installer.cc @@ -4,10 +4,10 @@ #include "chrome/browser/chromeos/file_manager/app_installer.h" -#include "base/strings/stringprintf.h" -#include "chrome/browser/profiles/profile.h" #include "content/public/browser/web_contents.h" +class Profile; + namespace file_manager { namespace { diff --git a/chrome/browser/chromeos/file_manager/app_installer.h b/chrome/browser/chromeos/file_manager/app_installer.h index 4fcb42f..efeff78 100644 --- a/chrome/browser/chromeos/file_manager/app_installer.h +++ b/chrome/browser/chromeos/file_manager/app_installer.h @@ -13,7 +13,7 @@ namespace content { class WebContents; -} +} // namespace content namespace file_manager { @@ -25,9 +25,9 @@ class AppInstaller typedef extensions::WebstoreStandaloneInstaller::Callback Callback; AppInstaller(content::WebContents* web_contents, - const std::string& webstore_item_id, - Profile* profile, - const Callback& callback); + const std::string& webstore_item_id, + Profile* profile, + const Callback& callback); protected: friend class base::RefCountedThreadSafe<AppInstaller>; diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.h b/chrome/browser/chromeos/file_manager/file_browser_handlers.h index a935be9..ef9524c 100644 --- a/chrome/browser/chromeos/file_manager/file_browser_handlers.h +++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.h @@ -17,7 +17,6 @@ class FileBrowserHandler; class GURL; -class PrefService; class Profile; namespace base { diff --git a/chrome/browser/chromeos/file_manager/file_tasks.cc b/chrome/browser/chromeos/file_manager/file_tasks.cc index 22ea8cf..e974a4b 100644 --- a/chrome/browser/chromeos/file_manager/file_tasks.cc +++ b/chrome/browser/chromeos/file_manager/file_tasks.cc @@ -18,8 +18,6 @@ #include "chrome/browser/chromeos/fileapi/file_system_backend.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/extensions/extension_system.h" #include "chrome/browser/extensions/extension_system.h" #include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/extensions/extension_util.h" diff --git a/chrome/browser/chromeos/file_manager/file_tasks.h b/chrome/browser/chromeos/file_manager/file_tasks.h index 968c4ae..8be6edc 100644 --- a/chrome/browser/chromeos/file_manager/file_tasks.h +++ b/chrome/browser/chromeos/file_manager/file_tasks.h @@ -6,7 +6,7 @@ // // WHAT ARE FILE TASKS? // -// File tasks are representatiosn of actions that can be performed over the +// File tasks are representation of actions that can be performed over the // currently selected files from Files.app. A task can be either of: // // 1) Chrome extension or app, registered via "file_handlers" or @@ -59,7 +59,7 @@ // WHAT ARE TASK IDS? // // You may have noticed that "taskId" fields in the above example look -// awakard. Apparently "taskId" encodes three types of information delimited +// awkward. Apparently "taskId" encodes three types of information delimited // by "|". This is a weird format for something called as an ID. // // 1) Why are the three types information encoded in this way? @@ -70,13 +70,13 @@ // // 2) OK, then what are the three types of information encoded here? // -// The task ID encodes the folloing structure: +// The task ID encodes the following structure: // // <app-id>|<task-type>|<task-action-id> // // <app-id> is either of Chrome Extension/App ID or Drive App ID. For some // reason, Chrome Extension/App IDs and Drive App IDs look differently. As of -// writing, the fomer looks like "hhaomjibdihmijegdhdafkllkbggdgoj" +// writing, the former looks like "hhaomjibdihmijegdhdafkllkbggdgoj" // (Files.app) and the latter looks like "419782477519" (Pixlr Editor). // // <task-type> is either of diff --git a/chrome/browser/chromeos/file_manager/mime_util.cc b/chrome/browser/chromeos/file_manager/mime_util.cc index 745d998..17792b3 100644 --- a/chrome/browser/chromeos/file_manager/mime_util.cc +++ b/chrome/browser/chromeos/file_manager/mime_util.cc @@ -4,17 +4,14 @@ #include "chrome/browser/chromeos/file_manager/mime_util.h" -#include <utility> #include "base/files/file_path.h" -#include "base/strings/string_util.h" #include "net/base/mime_util.h" namespace file_manager { namespace util { std::string GetMimeTypeForPath(const base::FilePath& file_path) { - const base::FilePath::StringType file_extension = - StringToLowerASCII(file_path.Extension()); + const base::FilePath::StringType file_extension = file_path.Extension(); // TODO(thorogood): Rearchitect this call so it can run on the File thread; // GetMimeTypeFromFile requires this on Linux. Right now, we use diff --git a/chrome/browser/chromeos/file_manager/mime_util.h b/chrome/browser/chromeos/file_manager/mime_util.h index 029e178..9bb532b 100644 --- a/chrome/browser/chromeos/file_manager/mime_util.h +++ b/chrome/browser/chromeos/file_manager/mime_util.h @@ -9,9 +9,6 @@ #include <string> -#include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" -#include "url/gurl.h" - namespace base { class FilePath; } diff --git a/chrome/browser/chromeos/file_manager/open_with_browser.cc b/chrome/browser/chromeos/file_manager/open_with_browser.cc index 218b32b..8b4e44c 100644 --- a/chrome/browser/chromeos/file_manager/open_with_browser.cc +++ b/chrome/browser/chromeos/file_manager/open_with_browser.cc @@ -11,22 +11,17 @@ #include "base/threading/sequenced_worker_pool.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/drive/file_system_util.h" -#include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" #include "chrome/browser/plugins/plugin_prefs.h" -#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h" -#include "chrome/browser/ui/simple_message_box.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" -#include "chromeos/chromeos_switches.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/plugin_service.h" #include "content/public/common/pepper_plugin_info.h" -#include "content/public/common/webplugininfo.h" #include "net/base/net_util.h" using content::BrowserThread; @@ -41,10 +36,6 @@ const base::FilePath::CharType kSwfExtension[] = FILE_PATH_LITERAL(".swf"); // List of file extensions viewable in the browser. const base::FilePath::CharType* kFileExtensionsViewableInBrowser[] = { -#if defined(GOOGLE_CHROME_BUILD) - FILE_PATH_LITERAL(".pdf"), - FILE_PATH_LITERAL(".swf"), -#endif FILE_PATH_LITERAL(".bmp"), FILE_PATH_LITERAL(".ico"), FILE_PATH_LITERAL(".jpg"), diff --git a/chrome/browser/chromeos/file_manager/volume_manager.cc b/chrome/browser/chromeos/file_manager/volume_manager.cc index 390a691..59d0447 100644 --- a/chrome/browser/chromeos/file_manager/volume_manager.cc +++ b/chrome/browser/chromeos/file_manager/volume_manager.cc @@ -163,7 +163,7 @@ void VolumeManager::Initialize() { // Path to mount user folders have changed several times. We need to migrate // the old preferences on paths to the new format when needed. For the detail, // see the comments in file_manager::util::MigratePathFromOldFormat, - // TODO(kinaba): Remove this are several rounds of releases. + // TODO(kinaba): Remove this after several rounds of releases. const char* kPathPreference[] = { prefs::kDownloadDefaultDirectory, prefs::kSelectFileLastDirectory, diff --git a/chrome/browser/chromeos/file_manager/zip_file_creator.h b/chrome/browser/chromeos/file_manager/zip_file_creator.h index e456863..bb4830e 100644 --- a/chrome/browser/chromeos/file_manager/zip_file_creator.h +++ b/chrome/browser/chromeos/file_manager/zip_file_creator.h @@ -8,7 +8,6 @@ #include <string> #include "base/files/file_path.h" -#include "base/memory/ref_counted.h" #include "base/platform_file.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/utility_process_host_client.h" |