summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authordsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 20:43:33 +0000
committerdsh@google.com <dsh@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-27 20:43:33 +0000
commite1acf6f902e50222baf99bfb492ecc38a1604975 (patch)
tree503d45705b14be7e2f1ed86c71d6064abbf90fbe /chrome/browser/download
parenta2f5993e1ce940e8a8eec900abaeed02e2eee09b (diff)
downloadchromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.zip
chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.gz
chromium_src-e1acf6f902e50222baf99bfb492ecc38a1604975.tar.bz2
Move Time, TimeDelta and TimeTicks into namespace base.
Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_file.cc2
-rw-r--r--chrome/browser/download/download_item_model.cc2
-rw-r--r--chrome/browser/download/download_manager.cc4
-rw-r--r--chrome/browser/download/download_manager.h17
-rw-r--r--chrome/browser/download/save_package.cc3
-rw-r--r--chrome/browser/download/save_package.h2
6 files changed, 19 insertions, 11 deletions
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc
index 6b0fba4..f921661 100644
--- a/chrome/browser/download/download_file.cc
+++ b/chrome/browser/download/download_file.cc
@@ -26,6 +26,8 @@
#include "net/base/net_util.h"
#include "net/url_request/url_request_context.h"
+using base::TimeDelta;
+
// Throttle updates to the UI thread so that a fast moving download doesn't
// cause it to become unresponsive (ins milliseconds).
static const int kUpdatePeriodMs = 500;
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc
index db93b35..5fa37a8 100644
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -11,6 +11,8 @@
#include "generated_resources.h"
+using base::TimeDelta;
+
DownloadItemModel::DownloadItemModel(DownloadItem* download)
: download_(download) {
}
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index f88bb80..23af781 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -41,6 +41,9 @@
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+
// Periodically update our observers.
class DownloadItemUpdateTask : public Task {
public:
@@ -1323,4 +1326,3 @@ void DownloadManager::OnSearchComplete(HistoryService::Handle handle,
requestor->SetDownloads(searched_downloads);
}
-
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h
index cbae765..38cc044 100644
--- a/chrome/browser/download/download_manager.h
+++ b/chrome/browser/download/download_manager.h
@@ -102,7 +102,7 @@ class DownloadItem {
int path_uniquifier,
const std::wstring& url,
const std::wstring& original_name,
- const Time start_time,
+ const base::Time start_time,
int64 download_size,
int render_process_id,
int request_id,
@@ -149,7 +149,7 @@ class DownloadItem {
// |*remaining| with the amount of time remaining if successful. Fails and
// returns false if we do not have the number of bytes or the speed so can
// not estimate.
- bool TimeRemaining(TimeDelta* remaining) const;
+ bool TimeRemaining(base::TimeDelta* remaining) const;
// Simple speed estimate in bytes/s
int64 CurrentSpeed() const;
@@ -178,7 +178,7 @@ class DownloadItem {
void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; }
int64 received_bytes() const { return received_bytes_; }
int32 id() const { return id_; }
- Time start_time() const { return start_time_; }
+ base::Time start_time() const { return start_time_; }
void set_db_handle(int64 handle) { db_handle_ = handle; }
int64 db_handle() const { return db_handle_; }
DownloadManager* manager() const { return manager_; }
@@ -237,7 +237,7 @@ class DownloadItem {
ObserverList<Observer> observers_;
// Time the download was started
- Time start_time_;
+ base::Time start_time_;
// Our persistent store handle
int64 db_handle_;
@@ -329,12 +329,13 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
// Remove downloads after remove_begin (inclusive) and before remove_end
// (exclusive). You may pass in null Time values to do an unbounded delete
// in either direction.
- int RemoveDownloadsBetween(const Time remove_begin, const Time remove_end);
+ int RemoveDownloadsBetween(const base::Time remove_begin,
+ const base::Time remove_end);
// Remove downloads will delete all downloads that have a timestamp that is
// the same or more recent than |remove_begin|. The number of downloads
// deleted is returned back to the caller.
- int RemoveDownloads(const Time remove_begin);
+ int RemoveDownloads(const base::Time remove_begin);
// Download the object at the URL. Used in cases such as "Save Link As..."
void DownloadUrl(const GURL& url,
@@ -418,8 +419,8 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
// Update the history service for a particular download.
void UpdateHistoryForDownload(DownloadItem* download);
void RemoveDownloadFromHistory(DownloadItem* download);
- void RemoveDownloadsFromHistoryBetween(const Time remove_begin,
- const Time remove_before);
+ void RemoveDownloadsFromHistoryBetween(const base::Time remove_begin,
+ const base::Time remove_before);
// Inform the notification service of download starts and stops.
void NotifyAboutDownloadStart();
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index e0dcc0b..b8bfc12 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -37,6 +37,8 @@
#include "generated_resources.h"
+using base::Time;
+
// Default name which will be used when we can not get proper name from
// resource URL.
static const wchar_t kDefaultSaveName[] = L"saved_resource";
@@ -1060,4 +1062,3 @@ bool SavePackage::GetSafePureFileName(const std::wstring& dir_path,
return false;
}
}
-
diff --git a/chrome/browser/download/save_package.h b/chrome/browser/download/save_package.h
index 101007b..d7b76e9 100644
--- a/chrome/browser/download/save_package.h
+++ b/chrome/browser/download/save_package.h
@@ -29,10 +29,10 @@ class Profile;
class WebContents;
class URLRequestContext;
class WebContents;
-class Time;
namespace base {
class Thread;
+class Time;
}
// The SavePackage object manages the process of saving a page as only-html or