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

Unified Diff: chrome/browser/chromeos/drive/download_handler.cc

Issue 1745723002: Fix ChromeOS-only static initializers from the last 5 months. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, address dhsharp comment Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/host/ash_window_tree_host.cc ('k') | chrome/browser/metrics/perf/perf_provider_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/download_handler.cc
diff --git a/chrome/browser/chromeos/drive/download_handler.cc b/chrome/browser/chromeos/drive/download_handler.cc
index 551e4af6e5b7d1f9ecf5fad517d2161e3ca0f077..59481b138e3b9277c6f9d7ebc72b72259aa84a36 100644
--- a/chrome/browser/chromeos/drive/download_handler.cc
+++ b/chrome/browser/chromeos/drive/download_handler.cc
@@ -24,8 +24,8 @@
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
-using content::DownloadManager;
using content::DownloadItem;
+using content::DownloadManager;
namespace drive {
namespace {
@@ -35,13 +35,13 @@ const char kDrivePathKey[] = "DrivePath";
// Mime types that we better not trust. If the file was downloade with these
// mime types, while uploading to Drive we ignore it at guess by our own logic.
-const char* kGenericMimeTypes[] = {"text/html", "text/plain",
- "application/octet-stream"};
+const char* const kGenericMimeTypes[] = {"text/html", "text/plain",
+ "application/octet-stream"};
// Longer is better. But at the same time, this value should be short enough as
// drive::internal::kMinFreeSpaceInBytes is not used up by file download in this
// interval.
-const base::TimeDelta kFreeDiskSpaceDelay = base::TimeDelta::FromSeconds(3);
+const int kFreeDiskSpaceDelayInSeconds = 3;
// User Data stored in DownloadItem for drive path.
class DriveUserData : public base::SupportsUserData::Data {
@@ -141,7 +141,8 @@ void IgnoreFreeDiskSpaceIfNeededForCallback(bool /*result*/) {}
DownloadHandler::DownloadHandler(FileSystemInterface* file_system)
: file_system_(file_system),
has_pending_free_disk_space_(false),
- free_disk_space_delay_(kFreeDiskSpaceDelay),
+ free_disk_space_delay_(
+ base::TimeDelta::FromSeconds(kFreeDiskSpaceDelayInSeconds)),
weak_ptr_factory_(this) {}
DownloadHandler::~DownloadHandler() {
@@ -166,7 +167,7 @@ void DownloadHandler::Initialize(
if (download_manager) {
notifier_.reset(new AllDownloadItemNotifier(download_manager, this));
// Remove any persisted Drive DownloadItem. crbug.com/171384
- content::DownloadManager::DownloadVector downloads;
+ DownloadManager::DownloadVector downloads;
download_manager->GetAllDownloads(&downloads);
for (size_t i = 0; i < downloads.size(); ++i) {
if (IsPersistedDriveDownload(drive_tmp_download_path_, downloads[i]))
« no previous file with comments | « ash/host/ash_window_tree_host.cc ('k') | chrome/browser/metrics/perf/perf_provider_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698