summaryrefslogtreecommitdiffstats
path: root/chrome
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
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')
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc1
-rw-r--r--chrome/browser/autocomplete/history_contents_provider.cc2
-rw-r--r--chrome/browser/autocomplete/history_contents_provider_unittest.cc3
-rw-r--r--chrome/browser/autocomplete/history_url_provider.cc4
-rw-r--r--chrome/browser/autocomplete/history_url_provider_unittest.cc3
-rw-r--r--chrome/browser/autocomplete/search_provider.cc3
-rw-r--r--chrome/browser/autocomplete/search_provider.h2
-rw-r--r--chrome/browser/automation/automation_provider.cc2
-rw-r--r--chrome/browser/automation/automation_tab_tracker.h12
-rw-r--r--chrome/browser/base_history_model.h2
-rw-r--r--chrome/browser/bookmarks/bookmark_codec.cc3
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_model.h12
-rw-r--r--chrome/browser/bookmarks/bookmark_model_unittest.cc3
-rw-r--r--chrome/browser/bookmarks/bookmark_table_model_unittest.cc3
-rw-r--r--chrome/browser/browser.cc2
-rw-r--r--chrome/browser/browser_shutdown.cc3
-rw-r--r--chrome/browser/browsing_data_remover.cc3
-rw-r--r--chrome/browser/browsing_data_remover.h12
-rw-r--r--chrome/browser/cache_manager_host.cc3
-rw-r--r--chrome/browser/cache_manager_host.h4
-rw-r--r--chrome/browser/cache_manager_host_unittest.cc2
-rw-r--r--chrome/browser/chrome_plugin_host.cc3
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc5
-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
-rw-r--r--chrome/browser/history/download_database.cc3
-rw-r--r--chrome/browser/history/download_database.h2
-rw-r--r--chrome/browser/history/download_types.h4
-rw-r--r--chrome/browser/history/expire_history_backend.cc3
-rw-r--r--chrome/browser/history/expire_history_backend.h18
-rw-r--r--chrome/browser/history/expire_history_backend_unittest.cc4
-rw-r--r--chrome/browser/history/history.cc1
-rw-r--r--chrome/browser/history/history.h12
-rw-r--r--chrome/browser/history/history_backend.cc4
-rw-r--r--chrome/browser/history/history_backend.h20
-rw-r--r--chrome/browser/history/history_backend_unittest.cc3
-rw-r--r--chrome/browser/history/history_marshaling.h4
-rw-r--r--chrome/browser/history/history_querying_unittest.cc3
-rw-r--r--chrome/browser/history/history_types.cc2
-rw-r--r--chrome/browser/history/history_types.h40
-rw-r--r--chrome/browser/history/history_types_unittest.cc2
-rw-r--r--chrome/browser/history/history_unittest.cc3
-rw-r--r--chrome/browser/history/starred_url_database.cc3
-rw-r--r--chrome/browser/history/starred_url_database.h4
-rw-r--r--chrome/browser/history/text_database.cc2
-rw-r--r--chrome/browser/history/text_database.h8
-rw-r--r--chrome/browser/history/text_database_manager.cc4
-rw-r--r--chrome/browser/history/text_database_manager.h28
-rw-r--r--chrome/browser/history/text_database_manager_unittest.cc4
-rw-r--r--chrome/browser/history/text_database_unittest.cc2
-rw-r--r--chrome/browser/history/thumbnail_database.cc2
-rw-r--r--chrome/browser/history/thumbnail_database.h8
-rw-r--r--chrome/browser/history/thumbnail_database_unittest.cc3
-rw-r--r--chrome/browser/history/url_database.cc2
-rw-r--r--chrome/browser/history/url_database_unittest.cc3
-rw-r--r--chrome/browser/history/visit_database.cc3
-rw-r--r--chrome/browser/history/visit_database.h10
-rw-r--r--chrome/browser/history/visit_database_unittest.cc3
-rw-r--r--chrome/browser/history/visitsegment_database.cc3
-rw-r--r--chrome/browser/history/visitsegment_database.h6
-rw-r--r--chrome/browser/history_model.cc2
-rw-r--r--chrome/browser/history_model.h4
-rw-r--r--chrome/browser/history_view.cc4
-rw-r--r--chrome/browser/ie7_password.h2
-rw-r--r--chrome/browser/importer/firefox2_importer.cc3
-rw-r--r--chrome/browser/importer/firefox2_importer.h2
-rw-r--r--chrome/browser/importer/firefox3_importer.cc3
-rw-r--r--chrome/browser/importer/firefox3_importer.h2
-rw-r--r--chrome/browser/importer/firefox_importer_unittest.cc2
-rw-r--r--chrome/browser/importer/ie_importer.cc2
-rw-r--r--chrome/browser/importer/importer.h2
-rw-r--r--chrome/browser/importer/mork_reader.cc2
-rw-r--r--chrome/browser/ipc_status_view.cc2
-rw-r--r--chrome/browser/jankometer.cc3
-rw-r--r--chrome/browser/load_notification_details.h6
-rw-r--r--chrome/browser/metrics_log.cc4
-rw-r--r--chrome/browser/metrics_log.h6
-rw-r--r--chrome/browser/metrics_log_unittest.cc2
-rw-r--r--chrome/browser/metrics_service.cc3
-rw-r--r--chrome/browser/metrics_service.h2
-rw-r--r--chrome/browser/navigation_controller_unittest.cc2
-rw-r--r--chrome/browser/net/dns_global.cc2
-rw-r--r--chrome/browser/net/dns_host_info.cc4
-rw-r--r--chrome/browser/net/dns_host_info.h33
-rw-r--r--chrome/browser/net/dns_host_info_unittest.cc2
-rw-r--r--chrome/browser/net/dns_master.cc2
-rw-r--r--chrome/browser/net/dns_master.h8
-rw-r--r--chrome/browser/net/dns_master_unittest.cc3
-rw-r--r--chrome/browser/password_form_manager.cc2
-rw-r--r--chrome/browser/printing/print_job.cc2
-rw-r--r--chrome/browser/printing/print_view_manager.cc2
-rw-r--r--chrome/browser/printing/printed_document.cc2
-rw-r--r--chrome/browser/printing/printing_layout_uitest.cc3
-rw-r--r--chrome/browser/printing/win_printing_context.cc2
-rw-r--r--chrome/browser/profile.cc3
-rw-r--r--chrome/browser/profile.h6
-rw-r--r--chrome/browser/render_view_host.cc2
-rw-r--r--chrome/browser/render_widget_helper.cc4
-rw-r--r--chrome/browser/render_widget_helper.h7
-rw-r--r--chrome/browser/render_widget_host.cc6
-rw-r--r--chrome/browser/render_widget_host.h8
-rw-r--r--chrome/browser/render_widget_host_view_win.cc3
-rw-r--r--chrome/browser/render_widget_host_view_win.h2
-rw-r--r--chrome/browser/resource_dispatcher_host.cc4
-rw-r--r--chrome/browser/resource_dispatcher_host.h2
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.cc2
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.h6
-rw-r--r--chrome/browser/safe_browsing/protocol_manager_unittest.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.h2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_bloom.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_bloom.h6
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_impl.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_impl.h8
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_impl_unittest.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc3
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.h10
-rw-r--r--chrome/browser/session_backend.cc3
-rw-r--r--chrome/browser/session_service.cc2
-rw-r--r--chrome/browser/session_service_test_helper.cc2
-rw-r--r--chrome/browser/spellchecker.cc2
-rw-r--r--chrome/browser/tab_restore_service.cc3
-rw-r--r--chrome/browser/tab_restore_service.h2
-rw-r--r--chrome/browser/template_url.h8
-rw-r--r--chrome/browser/template_url_model.cc3
-rw-r--r--chrome/browser/template_url_model.h4
-rw-r--r--chrome/browser/template_url_model_unittest.cc4
-rw-r--r--chrome/browser/template_url_prepopulate_data.cc2
-rw-r--r--chrome/browser/url_fetcher_protect.cc3
-rw-r--r--chrome/browser/url_fetcher_protect.h10
-rw-r--r--chrome/browser/url_fetcher_unittest.cc3
-rw-r--r--chrome/browser/views/bookmark_editor_view.cc1
-rw-r--r--chrome/browser/views/bookmark_editor_view_unittest.cc3
-rw-r--r--chrome/browser/views/clear_browsing_data.cc4
-rw-r--r--chrome/browser/views/constrained_window_impl.cc2
-rw-r--r--chrome/browser/views/download_item_view.cc2
-rw-r--r--chrome/browser/views/download_tab_view.cc4
-rw-r--r--chrome/browser/views/external_protocol_dialog.h1
-rw-r--r--chrome/browser/views/page_info_window.cc2
-rw-r--r--chrome/browser/views/shelf_item_dialog.cc2
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc1
-rw-r--r--chrome/browser/views/toolbar_star_toggle.cc3
-rw-r--r--chrome/browser/views/toolbar_star_toggle.h2
-rw-r--r--chrome/browser/visitedlink_perftest.cc2
-rw-r--r--chrome/browser/web_contents.cc3
-rw-r--r--chrome/browser/web_contents.h6
-rw-r--r--chrome/browser/webdata/web_data_service.cc2
-rw-r--r--chrome/browser/webdata/web_data_service.h10
-rw-r--r--chrome/browser/webdata/web_database.cc3
-rw-r--r--chrome/browser/webdata/web_database.h6
-rw-r--r--chrome/browser/webdata/web_database_unittest.cc3
-rw-r--r--chrome/common/animation.cc2
-rw-r--r--chrome/common/chrome_plugin_lib.cc2
-rw-r--r--chrome/common/ipc_logging.cc3
-rw-r--r--chrome/common/ipc_message_utils.h12
-rw-r--r--chrome/common/ipc_sync_channel.cc2
-rw-r--r--chrome/common/net/cookie_monster_sqlite.cc3
-rw-r--r--chrome/common/net/url_request_intercept_job.cc4
-rw-r--r--chrome/common/thumbnail_score.cc3
-rw-r--r--chrome/common/thumbnail_score.h6
-rw-r--r--chrome/common/time_format.cc3
-rw-r--r--chrome/common/time_format.h11
-rw-r--r--chrome/common/time_format_unittest.cc3
-rw-r--r--chrome/renderer/render_view.cc2
-rw-r--r--chrome/test/automation/autocomplete_edit_proxy.cc3
-rw-r--r--chrome/test/automation/automation_proxy.cc4
-rw-r--r--chrome/test/automation/browser_proxy.cc3
-rw-r--r--chrome/test/startup/feature_startup_test.cc2
-rw-r--r--chrome/test/startup/startup_test.cc3
-rw-r--r--chrome/test/testing_profile.cc2
-rw-r--r--chrome/test/testing_profile.h4
-rw-r--r--chrome/test/ui/ui_test.cc2
-rw-r--r--chrome/test/ui/ui_test.h2
-rw-r--r--chrome/tools/profiles/generate_profile.cc3
-rw-r--r--chrome/views/chrome_menu.cc4
-rw-r--r--chrome/views/menu_button.cc3
-rw-r--r--chrome/views/menu_button.h2
-rw-r--r--chrome/views/repeat_controller.cc2
-rw-r--r--chrome/views/throbber.cc2
185 files changed, 539 insertions, 249 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index 9001b11..603b0a9 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -26,6 +26,7 @@
#include "generated_resources.h"
+using base::TimeDelta;
// AutocompleteInput ----------------------------------------------------------
diff --git a/chrome/browser/autocomplete/history_contents_provider.cc b/chrome/browser/autocomplete/history_contents_provider.cc
index c1ef435c..9c50bd3 100644
--- a/chrome/browser/autocomplete/history_contents_provider.cc
+++ b/chrome/browser/autocomplete/history_contents_provider.cc
@@ -10,6 +10,8 @@
#include "chrome/browser/profile.h"
#include "net/base/net_util.h"
+using base::TimeTicks;
+
namespace {
// Number of days to search for full text results. The longer this is, the more
diff --git a/chrome/browser/autocomplete/history_contents_provider_unittest.cc b/chrome/browser/autocomplete/history_contents_provider_unittest.cc
index 9777c71..0ab3d76 100644
--- a/chrome/browser/autocomplete/history_contents_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_contents_provider_unittest.cc
@@ -11,6 +11,9 @@
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
namespace {
struct TestEntry {
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 9a25e90..cdbc82d 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -23,6 +23,10 @@
#include "googleurl/src/url_util.h"
#include "net/base/net_util.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
HistoryURLProviderParams::HistoryURLProviderParams(
const AutocompleteInput& input,
bool trim_http,
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc
index 0f5fc5d..610191f 100644
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc
@@ -11,6 +11,9 @@
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
struct TestURLInfo {
std::wstring url;
std::wstring title;
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index c631ec2..b7b260e 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -19,6 +19,9 @@
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+
const int SearchProvider::kQueryDelayMs = 200;
void SearchProvider::Start(const AutocompleteInput& input,
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index 9e7fde1..e6030dc 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -116,7 +116,7 @@ class SearchProvider : public AutocompleteProvider,
// algorithms for the different types of matches.
int CalculateRelevanceForWhatYouTyped() const;
// |time| is the time at which this query was last seen.
- int CalculateRelevanceForHistory(const Time& time) const;
+ int CalculateRelevanceForHistory(const base::Time& time) const;
// |suggestion_value| is which suggestion this is in the list returned from
// the server; the best suggestion is suggestion number 0.
int CalculateRelevanceForSuggestion(size_t suggestion_value) const;
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index f3d21a7..d567a53 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -34,6 +34,8 @@
#include "net/base/cookie_monster.h"
#include "net/url_request/url_request_filter.h"
+using base::Time;
+
class InitialLoadObserver : public NotificationObserver {
public:
InitialLoadObserver(size_t tab_count, AutomationProvider* automation)
diff --git a/chrome/browser/automation/automation_tab_tracker.h b/chrome/browser/automation/automation_tab_tracker.h
index bb9ac24..9e0c63c 100644
--- a/chrome/browser/automation/automation_tab_tracker.h
+++ b/chrome/browser/automation/automation_tab_tracker.h
@@ -52,11 +52,11 @@ public:
switch (type) {
case NOTIFY_NAV_ENTRY_COMMITTED:
last_navigation_times_[Source<NavigationController>(source).ptr()] =
- Time::Now();
+ base::Time::Now();
return;
case NOTIFY_EXTERNAL_TAB_CLOSED:
case NOTIFY_TAB_CLOSING:
- std::map<NavigationController*, Time>::iterator iter =
+ std::map<NavigationController*, base::Time>::iterator iter =
last_navigation_times_.find(
Source<NavigationController>(source).ptr());
if (iter != last_navigation_times_.end())
@@ -66,22 +66,22 @@ public:
AutomationResourceTracker::Observe(type, source, details);
}
- Time GetLastNavigationTime(int handle) {
+ base::Time GetLastNavigationTime(int handle) {
if (ContainsHandle(handle)) {
NavigationController* controller = GetResource(handle);
if (controller) {
- std::map<NavigationController*, Time>::const_iterator iter =
+ std::map<NavigationController*, base::Time>::const_iterator iter =
last_navigation_times_.find(controller);
if (iter != last_navigation_times_.end())
return iter->second;
}
}
- return Time();
+ return base::Time();
}
private:
// Last time a navigation occurred.
- std::map<NavigationController*, Time> last_navigation_times_;
+ std::map<NavigationController*, base::Time> last_navigation_times_;
DISALLOW_COPY_AND_ASSIGN(AutomationTabTracker);
};
diff --git a/chrome/browser/base_history_model.h b/chrome/browser/base_history_model.h
index 51a0aca..21f3dd3 100644
--- a/chrome/browser/base_history_model.h
+++ b/chrome/browser/base_history_model.h
@@ -49,7 +49,7 @@ class BaseHistoryModel {
virtual int GetItemCount() = 0;
// Returns the time of the visit with the given index.
- virtual Time GetVisitTime(int index) = 0;
+ virtual base::Time GetVisitTime(int index) = 0;
// Returns the title at the specified index.
virtual const std::wstring& GetTitle(int index) = 0;
diff --git a/chrome/browser/bookmarks/bookmark_codec.cc b/chrome/browser/bookmarks/bookmark_codec.cc
index d37f830..1bea43e 100644
--- a/chrome/browser/bookmarks/bookmark_codec.cc
+++ b/chrome/browser/bookmarks/bookmark_codec.cc
@@ -12,6 +12,8 @@
#include "generated_resources.h"
+using base::Time;
+
// Key names.
static const wchar_t* kRootsKey = L"roots";
static const wchar_t* kRootFolderNameKey = L"bookmark_bar";
@@ -193,4 +195,3 @@ bool BookmarkCodec::DecodeNode(BookmarkModel* model,
Time::FromInternalValue(StringToInt64(date_added_string));
return true;
}
-
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 14430a3..ceb1ca9 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -13,6 +13,8 @@
#include "generated_resources.h"
+using base::Time;
+
namespace {
// Functions used for sorting.
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index 2f3f32d..1262a9e 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -69,11 +69,11 @@ class BookmarkNode : public views::TreeNode<BookmarkNode> {
}
// Returns the time the bookmark/group was added.
- Time date_added() const { return date_added_; }
+ base::Time date_added() const { return date_added_; }
// Returns the last time the group was modified. This is only maintained
// for folders (including the bookmark and other folder).
- Time date_group_modified() const { return date_group_modified_; }
+ base::Time date_group_modified() const { return date_group_modified_; }
// Convenience for testing if this nodes represents a group. A group is
// a node whose type is not URL.
@@ -114,10 +114,10 @@ class BookmarkNode : public views::TreeNode<BookmarkNode> {
history::StarredEntry::Type type_;
// Date we were created.
- Time date_added_;
+ base::Time date_added_;
// Time last modified. Only used for groups.
- Time date_group_modified_;
+ base::Time date_group_modified_;
DISALLOW_COPY_AND_ASSIGN(BookmarkNode);
};
@@ -292,7 +292,7 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
int index,
const std::wstring& title,
const GURL& url,
- const Time& creation_time);
+ const base::Time& creation_time);
// This is the convenience that makes sure the url is starred or not starred.
// If is_starred is false, all bookmarks for URL are removed. If is_starred is
@@ -373,7 +373,7 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
bool IsValidIndex(BookmarkNode* parent, int index, bool allow_end);
// Sets the date modified time of the specified node.
- void SetDateGroupModified(BookmarkNode* parent, const Time time);
+ void SetDateGroupModified(BookmarkNode* parent, const base::Time time);
// Creates the bookmark bar/other nodes. These call into
// CreateRootNodeFromStarredEntry.
diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc
index 9edde81..2136347 100644
--- a/chrome/browser/bookmarks/bookmark_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc
@@ -12,6 +12,9 @@
#include "chrome/views/tree_node_model.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
class BookmarkModelTest : public testing::Test, public BookmarkModelObserver {
public:
struct ObserverDetails {
diff --git a/chrome/browser/bookmarks/bookmark_table_model_unittest.cc b/chrome/browser/bookmarks/bookmark_table_model_unittest.cc
index ed2b215..04055ee 100644
--- a/chrome/browser/bookmarks/bookmark_table_model_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_table_model_unittest.cc
@@ -10,6 +10,9 @@
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+
// Base class for bookmark model tests.
// Initial state of the bookmark model is as follows:
// bb
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index a876d60..1ac1fb7 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -56,6 +56,8 @@
#include "chromium_strings.h"
#include "generated_resources.h"
+using base::TimeDelta;
+
static BrowserList g_browserlist;
// How long we wait before updating the browser chrome while loading a page.
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 029d5fa..ef38181 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -24,6 +24,9 @@
#include "chrome/browser/plugin_service.h"
#include "net/dns_global.h"
+using base::Time;
+using base::TimeDelta;
+
namespace browser_shutdown {
Time shutdown_started_;
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index c38424a..b1823a7 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -20,6 +20,8 @@
#include "net/url_request/url_request_context.h"
#include "webkit/glue/password_form.h"
+using base::Time;
+
// Done so that we can use invokeLater on BrowsingDataRemovers and not have
// BrowsingDataRemover implement RefCounted.
void RunnableMethodTraits<BrowsingDataRemover>::RetainCallee(
@@ -200,4 +202,3 @@ void BrowsingDataRemover::ClearCacheOnIOThread(Time delete_begin,
ui_loop->PostTask(FROM_HERE, NewRunnableMethod(
this, &BrowsingDataRemover::ClearedCache));
}
-
diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h
index 2e2b2a3..81819f0 100644
--- a/chrome/browser/browsing_data_remover.h
+++ b/chrome/browser/browsing_data_remover.h
@@ -36,7 +36,8 @@ class BrowsingDataRemover : public NotificationObserver {
// Creates a BrowsingDataRemover to remove browser data from the specified
// profile in the specified time range. Use Remove to initiate the removal.
- BrowsingDataRemover(Profile* profile, Time delete_begin, Time delete_end);
+ BrowsingDataRemover(Profile* profile, base::Time delete_begin,
+ base::Time delete_end);
~BrowsingDataRemover();
// Removes the specified items related to browsing.
@@ -64,8 +65,8 @@ class BrowsingDataRemover : public NotificationObserver {
void ClearedCache();
// Invoked on the IO thread to delete from the cache.
- void ClearCacheOnIOThread(Time delete_begin,
- Time delete_end,
+ void ClearCacheOnIOThread(base::Time delete_begin,
+ base::Time delete_end,
MessageLoop* ui_loop);
// Returns true if we're all done.
@@ -78,10 +79,10 @@ class BrowsingDataRemover : public NotificationObserver {
Profile* profile_;
// Start time to delete from.
- const Time delete_begin_;
+ const base::Time delete_begin_;
// End time to delete to.
- const Time delete_end_;
+ const base::Time delete_end_;
// True if Remove has been invoked.
bool removing_;
@@ -104,4 +105,3 @@ class BrowsingDataRemover : public NotificationObserver {
};
#endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H__
-
diff --git a/chrome/browser/cache_manager_host.cc b/chrome/browser/cache_manager_host.cc
index be6faf3..c68cbaa8 100644
--- a/chrome/browser/cache_manager_host.cc
+++ b/chrome/browser/cache_manager_host.cc
@@ -15,6 +15,9 @@
#include "chrome/common/pref_service.h"
#include "chrome/common/notification_service.h"
+using base::Time;
+using base::TimeDelta;
+
static const unsigned int kReviseAllocationDelayMS = 200 /* milliseconds */;
// The default size limit of the in-memory cache is 8 MB
diff --git a/chrome/browser/cache_manager_host.h b/chrome/browser/cache_manager_host.h
index bff754e..a67c345 100644
--- a/chrome/browser/cache_manager_host.h
+++ b/chrome/browser/cache_manager_host.h
@@ -68,12 +68,12 @@ class CacheManagerHost {
protected:
// The amount of idle time before we consider a tab to be "inactive"
- static const TimeDelta kRendererInactiveThreshold;
+ static const base::TimeDelta kRendererInactiveThreshold;
// Keep track of some renderer information.
struct RendererInfo : CacheManager::UsageStats {
// The access time for this renderer.
- Time access;
+ base::Time access;
};
typedef std::map<int, RendererInfo> StatsMap;
diff --git a/chrome/browser/cache_manager_host_unittest.cc b/chrome/browser/cache_manager_host_unittest.cc
index e90d3c0..5dc9684 100644
--- a/chrome/browser/cache_manager_host_unittest.cc
+++ b/chrome/browser/cache_manager_host_unittest.cc
@@ -9,6 +9,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/cache_manager.h"
+using base::Time;
+
class CacheManagerHostTest : public testing::Test {
protected:
typedef CacheManagerHost::StatsMap StatsMap;
diff --git a/chrome/browser/chrome_plugin_host.cc b/chrome/browser/chrome_plugin_host.cc
index f96a8da..1c7af93 100644
--- a/chrome/browser/chrome_plugin_host.cc
+++ b/chrome/browser/chrome_plugin_host.cc
@@ -40,6 +40,8 @@
#include "net/base/base64.h"
#include "skia/include/SkBitmap.h"
+using base::TimeDelta;
+
// This class manages the interception of network requests. It queries the
// plugin on every request, and creates an intercept job if the plugin can
// intercept the request.
@@ -755,4 +757,3 @@ void CPHandleCommand(int command, CPCommandInterface* data,
NewRunnableFunction(PluginCommandHandler::HandleCommand,
command, data, context_as_int32));
}
-
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 3e36ab4..441d8ea 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -27,6 +27,10 @@
#include "chromium_strings.h"
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
// The URL scheme used for the new tab.
static const char kNewTabUIScheme[] = "chrome-internal";
@@ -823,4 +827,3 @@ void NewTabUIContents::RequestOpenURL(const GURL& url,
}
}
}
-
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
diff --git a/chrome/browser/history/download_database.cc b/chrome/browser/history/download_database.cc
index e604e5d..0be6c10 100644
--- a/chrome/browser/history/download_database.cc
+++ b/chrome/browser/history/download_database.cc
@@ -12,6 +12,8 @@
#include "chrome/common/sqlite_utils.h"
#include "chrome/common/sqlite_compiled_statement.h"
+using base::Time;
+
// Download schema:
//
// id SQLite-generated primary key.
@@ -175,4 +177,3 @@ void DownloadDatabase::SearchDownloads(std::vector<int64>* results,
}
} // namespace history
-
diff --git a/chrome/browser/history/download_database.h b/chrome/browser/history/download_database.h
index d733546..fcf72f0 100644
--- a/chrome/browser/history/download_database.h
+++ b/chrome/browser/history/download_database.h
@@ -40,7 +40,7 @@ class DownloadDatabase {
// (inclusive) and before |remove_end|. You may use null Time values
// to do an unbounded delete in either direction. This function ignores
// all downloads that are in progress or are waiting to be cancelled.
- void RemoveDownloadsBetween(Time remove_begin, Time remove_end);
+ void RemoveDownloadsBetween(base::Time remove_begin, base::Time remove_end);
// Search for downloads matching the search text.
void SearchDownloads(std::vector<int64>* results,
diff --git a/chrome/browser/history/download_types.h b/chrome/browser/history/download_types.h
index 7a8258d..61a6d83 100644
--- a/chrome/browser/history/download_types.h
+++ b/chrome/browser/history/download_types.h
@@ -20,7 +20,7 @@
struct DownloadCreateInfo {
DownloadCreateInfo(const std::wstring& path,
const std::wstring& url,
- Time start_time,
+ base::Time start_time,
int64 received_bytes,
int64 total_bytes,
int32 state,
@@ -50,7 +50,7 @@ struct DownloadCreateInfo {
// A number that should be added to the suggested path to make it unique.
// 0 means no number should be appended. Not actually stored in the db.
int path_uniquifier;
- Time start_time;
+ base::Time start_time;
int64 received_bytes;
int64 total_bytes;
int32 state;
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index fcd8f67..0944b87 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -16,6 +16,9 @@
#include "chrome/browser/history/thumbnail_database.h"
#include "chrome/common/notification_types.h"
+using base::Time;
+using base::TimeDelta;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/expire_history_backend.h b/chrome/browser/history/expire_history_backend.h
index d795f88..55c72c3 100644
--- a/chrome/browser/history/expire_history_backend.h
+++ b/chrome/browser/history/expire_history_backend.h
@@ -59,25 +59,25 @@ class ExpireHistoryBackend {
// Begins periodic expiration of history older than the given threshold. This
// will continue until the object is deleted.
- void StartArchivingOldStuff(TimeDelta expiration_threshold);
+ void StartArchivingOldStuff(base::TimeDelta expiration_threshold);
// Deletes everything associated with a URL.
void DeleteURL(const GURL& url);
// Removes all visits in the given time range, updating the URLs accordingly.
- void ExpireHistoryBetween(Time begin_time, Time end_time);
+ void ExpireHistoryBetween(base::Time begin_time, base::Time end_time);
// Archives all visits before and including the given time, updating the URLs
// accordingly. This function is intended for migrating old databases
// (which encompased all time) to the tiered structure and testing, and
// probably isn't useful for anything else.
- void ArchiveHistoryBefore(Time end_time);
+ void ArchiveHistoryBefore(base::Time end_time);
// Returns the current time that we are archiving stuff to. This will return
// the threshold in absolute time rather than a delta, so the caller should
// not save it.
- Time GetCurrentArchiveTime() const {
- return Time::Now() - expiration_threshold_;
+ base::Time GetCurrentArchiveTime() const {
+ return base::Time::Now() - expiration_threshold_;
}
private:
@@ -90,7 +90,7 @@ class ExpireHistoryBackend {
struct DeleteDependencies {
// The time range affected. These can be is_null() to be unbounded in one
// or both directions.
- Time begin_time, end_time;
+ base::Time begin_time, end_time;
// ----- Filled by DeleteVisitRelatedInfo or manually if a function doesn't
// call that function. -----
@@ -208,7 +208,7 @@ class ExpireHistoryBackend {
// Schedules a call to DoArchiveIteration at the given time in the
// future.
- void ScheduleArchive(TimeDelta delay);
+ void ScheduleArchive(base::TimeDelta delay);
// Calls ArchiveSomeOldHistory to expire some amount of old history, and
// schedules another call to happen in the future.
@@ -218,7 +218,7 @@ class ExpireHistoryBackend {
// than |time_threshold|. The return value indicates if we think there might
// be more history to expire with the current time threshold (it does not
// indicate success or failure).
- bool ArchiveSomeOldHistory(Time time_threshold, int max_visits);
+ bool ArchiveSomeOldHistory(base::Time time_threshold, int max_visits);
// Tries to detect possible bad history or inconsistencies in the database
// and deletes items. For example, URLs with no visits.
@@ -243,7 +243,7 @@ class ExpireHistoryBackend {
// The threshold for "old" history where we will automatically expire it to
// the archived database.
- TimeDelta expiration_threshold_;
+ base::TimeDelta expiration_threshold_;
// The BookmarkService; may be null. This is owned by the Profile.
//
diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc
index e067894..fab52e5 100644
--- a/chrome/browser/history/expire_history_backend_unittest.cc
+++ b/chrome/browser/history/expire_history_backend_unittest.cc
@@ -20,6 +20,10 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "SkBitmap.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
// The test must be in the history namespace for the gtest forward declarations
// to work. It also eliminates a bunch of ugly "history::".
namespace history {
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index 92bea22..53afbd5 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -47,6 +47,7 @@
#include "chromium_strings.h"
#include "generated_resources.h"
+using base::Time;
using history::HistoryBackend;
// Sends messages from the backend to us on the main thread. This must be a
diff --git a/chrome/browser/history/history.h b/chrome/browser/history/history.h
index 2aee029..dcd5518 100644
--- a/chrome/browser/history/history.h
+++ b/chrome/browser/history/history.h
@@ -163,7 +163,7 @@ class HistoryService : public CancelableRequestProvider,
// For adding pages to history with a specific time. This is for testing
// purposes. Call the previous one to use the current time.
void AddPage(const GURL& url,
- Time time,
+ base::Time time,
const void* id_scope,
int32 page_id,
const GURL& referrer,
@@ -280,7 +280,7 @@ class HistoryService : public CancelableRequestProvider,
typedef Callback4<Handle,
bool, // Were we able to determine the # of visits?
int, // Number of visits.
- Time>::Type // Time of first visit. Only first bool is
+ base::Time>::Type // Time of first visit. Only first bool is
// true and int is > 0.
GetVisitCountToHostCallback;
@@ -387,7 +387,7 @@ class HistoryService : public CancelableRequestProvider,
// if they are no longer referenced. |callback| runs when the expiration is
// complete. You may use null Time values to do an unbounded delete in
// either direction.
- void ExpireHistoryBetween(Time begin_time, Time end_time,
+ void ExpireHistoryBetween(base::Time begin_time, base::Time end_time,
CancelableRequestConsumerBase* consumer,
ExpireHistoryCallback* callback);
@@ -434,7 +434,7 @@ class HistoryService : public CancelableRequestProvider,
// progress or in the process of being cancelled. This is a 'fire and forget'
// operation. You can pass is_null times to get unbounded time in either or
// both directions.
- void RemoveDownloadsBetween(Time remove_begin, Time remove_end);
+ void RemoveDownloadsBetween(base::Time remove_begin, base::Time remove_end);
// Implemented by the caller of 'SearchDownloads' below, and is called when
// the history system has retrieved the search results.
@@ -464,7 +464,7 @@ class HistoryService : public CancelableRequestProvider,
// to the segment ID. The URL and all the other information is set to the page
// representing the segment.
Handle QuerySegmentUsageSince(CancelableRequestConsumerBase* consumer,
- const Time from_time,
+ const base::Time from_time,
SegmentQueryCallback* callback);
// Set the presentation index for the segment identified by |segment_id|.
@@ -533,7 +533,7 @@ class HistoryService : public CancelableRequestProvider,
const std::wstring& title,
int visit_count,
int typed_count,
- Time last_visit,
+ base::Time last_visit,
bool hidden);
// The same as AddPageWithDetails() but takes a vector.
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index f8e6449..afaee0a 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -23,6 +23,10 @@
#include "googleurl/src/gurl.h"
#include "net/base/registry_controlled_domain.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
/* The HistoryBackend consists of a number of components:
HistoryDatabase (stores past 3 months of history)
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index e646570..b03a781 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -197,16 +197,16 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
void CreateDownload(scoped_refptr<DownloadCreateRequest> request,
const DownloadCreateInfo& info);
void RemoveDownload(int64 db_handle);
- void RemoveDownloadsBetween(const Time remove_begin,
- const Time remove_end);
- void RemoveDownloads(const Time remove_end);
+ void RemoveDownloadsBetween(const base::Time remove_begin,
+ const base::Time remove_end);
+ void RemoveDownloads(const base::Time remove_end);
void SearchDownloads(scoped_refptr<DownloadSearchRequest>,
const std::wstring& search_text);
// Segment usage -------------------------------------------------------------
void QuerySegmentUsage(scoped_refptr<QuerySegmentUsageRequest> request,
- const Time from_time);
+ const base::Time from_time);
void DeleteOldSegmentData();
void SetSegmentPresentationIndex(SegmentID segment_id, int index);
@@ -234,8 +234,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// Calls ExpireHistoryBackend::ExpireHistoryBetween and commits the change.
void ExpireHistoryBetween(scoped_refptr<ExpireHistoryRequest> request,
- Time begin_time,
- Time end_time);
+ base::Time begin_time,
+ base::Time end_time);
// Bookmarks -----------------------------------------------------------------
@@ -282,7 +282,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// This does not schedule database commits, it is intended to be used as a
// subroutine for AddPage only. It also assumes the database is valid.
std::pair<URLID, VisitID> AddPageVisit(const GURL& url,
- Time time,
+ base::Time time,
VisitID referring_visit,
PageTransition::Type transition);
@@ -345,7 +345,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
VisitID from_visit,
VisitID visit_id,
PageTransition::Type transition_type,
- const Time ts);
+ const base::Time ts);
// Favicons ------------------------------------------------------------------
@@ -454,13 +454,13 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// of the timer), so we can try to ensure they're unique when they're added
// to the database by using the last_recorded_time_ (q.v.). We still can't
// enforce or guarantee uniqueness, since the user might set his clock back.
- Time last_requested_time_;
+ base::Time last_requested_time_;
// Timestamp of the last page addition, as it was recorded in the database.
// If two or more requests come in at the same time, we increment that time
// by 1 us between them so it's more likely to be unique in the database.
// This keeps track of that higher-resolution timestamp.
- Time last_recorded_time_;
+ base::Time last_recorded_time_;
// When non-NULL, this is the task that should be invoked on
MessageLoop* backend_destroy_message_loop_;
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index 3bbb716..a762df4 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -14,6 +14,8 @@
#include "chrome/tools/profiles/thumbnail-inl.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+
// This file only tests functionality where it is most convenient to call the
// backend directly. Most of the history backend functions are tested by the
// history unit test. Because of the elaborate callbacks involved, this is no
@@ -385,4 +387,3 @@ TEST_F(HistoryBackendTest, GetPageThumbnailAfterRedirects) {
}
} // namespace history
-
diff --git a/chrome/browser/history/history_marshaling.h b/chrome/browser/history/history_marshaling.h
index fa02095..6ec7d3a 100644
--- a/chrome/browser/history/history_marshaling.h
+++ b/chrome/browser/history/history_marshaling.h
@@ -21,7 +21,7 @@ namespace history {
class HistoryAddPageArgs : public base::RefCounted<HistoryAddPageArgs> {
public:
HistoryAddPageArgs(const GURL& arg_url,
- Time arg_time,
+ base::Time arg_time,
const void* arg_id_scope,
int32 arg_page_id,
const GURL& arg_referrer,
@@ -37,7 +37,7 @@ class HistoryAddPageArgs : public base::RefCounted<HistoryAddPageArgs> {
}
GURL url;
- Time time;
+ base::Time time;
const void* id_scope;
int32 page_id;
diff --git a/chrome/browser/history/history_querying_unittest.cc b/chrome/browser/history/history_querying_unittest.cc
index 625bc5b..cb6bfc5 100644
--- a/chrome/browser/history/history_querying_unittest.cc
+++ b/chrome/browser/history/history_querying_unittest.cc
@@ -8,6 +8,9 @@
#include "chrome/browser/history/history.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
// Tests the history service for querying functionality.
namespace history {
diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc
index 44abb65..5d9a2f7 100644
--- a/chrome/browser/history/history_types.cc
+++ b/chrome/browser/history/history_types.cc
@@ -6,6 +6,8 @@
#include "chrome/browser/history/history_types.h"
+using base::Time;
+
namespace history {
// URLRow ----------------------------------------------------------------------
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index 5ad53205..cc64a45 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -97,10 +97,10 @@ class URLRow {
typed_count_ = typed_count;
}
- Time last_visit() const {
+ base::Time last_visit() const {
return last_visit_;
}
- void set_last_visit(Time last_visit) {
+ void set_last_visit(base::Time last_visit) {
last_visit_ = last_visit;
}
@@ -151,7 +151,7 @@ class URLRow {
// The date of the last visit of this URL, which saves us from having to
// loop up in the visit table for things like autocomplete and expiration.
- Time last_visit_;
+ base::Time last_visit_;
// Indicates this entry should now be shown in typical UI or queries, this
// is usually for subframes.
@@ -173,7 +173,7 @@ class VisitRow {
public:
VisitRow();
VisitRow(URLID arg_url_id,
- Time arg_visit_time,
+ base::Time arg_visit_time,
VisitID arg_referring_visit,
PageTransition::Type arg_transition,
SegmentID arg_segment_id);
@@ -184,7 +184,7 @@ class VisitRow {
// Row ID into the URL table of the URL that this page is.
URLID url_id;
- Time visit_time;
+ base::Time visit_time;
// Indicates another visit that was the referring page for this one.
// 0 indicates no referrer.
@@ -236,7 +236,7 @@ struct ImportedFavIconUsage {
// associated with a VisitRow.
struct PageVisit {
URLID page_id;
- Time visit_time;
+ base::Time visit_time;
};
// StarredEntry ---------------------------------------------------------------
@@ -278,7 +278,7 @@ struct StarredEntry {
std::wstring title;
// When this was added.
- Time date_added;
+ base::Time date_added;
// Group ID of the star group this entry is in. If 0, this entry is not
// in a star group.
@@ -305,7 +305,7 @@ struct StarredEntry {
// Time the entry was last modified. This is only used for groups and
// indicates the last time a URL was added as a child to the group.
- Time date_group_modified;
+ base::Time date_group_modified;
};
// URLResult -------------------------------------------------------------------
@@ -313,7 +313,7 @@ struct StarredEntry {
class URLResult : public URLRow {
public:
URLResult() {}
- URLResult(const GURL& url, Time visit_time)
+ URLResult(const GURL& url, base::Time visit_time)
: URLRow(url),
visit_time_(visit_time) {
}
@@ -324,8 +324,8 @@ class URLResult : public URLRow {
title_match_positions_ = title_matches;
}
- Time visit_time() const { return visit_time_; }
- void set_visit_time(Time visit_time) { visit_time_ = visit_time; }
+ base::Time visit_time() const { return visit_time_; }
+ void set_visit_time(base::Time visit_time) { visit_time_ = visit_time; }
const Snippet& snippet() const { return snippet_; }
@@ -342,7 +342,7 @@ class URLResult : public URLRow {
friend class HistoryBackend;
// The time that this result corresponds to.
- Time visit_time_;
+ base::Time visit_time_;
// These values are typically set by HistoryBackend.
Snippet snippet_;
@@ -373,8 +373,8 @@ class QueryResults {
//
// TODO(brettw): bug 1203054: This field is not currently set properly! Do
// not use until the bug is fixed.
- Time first_time_searched() const { return first_time_searched_; }
- void set_first_time_searched(Time t) { first_time_searched_ = t; }
+ base::Time first_time_searched() const { return first_time_searched_; }
+ void set_first_time_searched(base::Time t) { first_time_searched_ = t; }
// Note: If you need end_time_searched, it can be added.
size_t size() const { return results_.size(); }
@@ -429,7 +429,7 @@ class QueryResults {
// (this is inclusive). This is used when inserting or deleting.
void AdjustResultMap(size_t begin, size_t end, ptrdiff_t delta);
- Time first_time_searched_;
+ base::Time first_time_searched_;
// The ordered list of results. The pointers inside this are owned by this
// QueryResults object.
@@ -460,13 +460,13 @@ struct QueryOptions {
// will be searched. However, if you set one, you must set the other.
//
// The beginning is inclusive and the ending is exclusive.
- Time begin_time;
- Time end_time;
+ base::Time begin_time;
+ base::Time end_time;
// Sets the query time to the last |days_ago| days to the present time.
void SetRecentDayRange(int days_ago) {
- end_time = Time::Now();
- begin_time = end_time - TimeDelta::FromDays(days_ago);
+ end_time = base::Time::Now();
+ begin_time = end_time - base::TimeDelta::FromDays(days_ago);
}
// When set, only one visit for each URL will be returned, which will be the
@@ -489,7 +489,7 @@ struct QueryOptions {
// gives the time and search term of the keyword visit.
struct KeywordSearchTermVisit {
// The time of the visit.
- Time time;
+ base::Time time;
// The search term that was used.
std::wstring term;
diff --git a/chrome/browser/history/history_types_unittest.cc b/chrome/browser/history/history_types_unittest.cc
index 7365e53..2bc0382 100644
--- a/chrome/browser/history/history_types_unittest.cc
+++ b/chrome/browser/history/history_types_unittest.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/history/history_types.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc
index 6e00e1b..11b58b0 100644
--- a/chrome/browser/history/history_unittest.cc
+++ b/chrome/browser/history/history_unittest.cc
@@ -43,6 +43,9 @@
#include "chrome/tools/profiles/thumbnail-inl.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
class HistoryTest;
// Specialize RunnableMethodTraits for HistoryTest so we can create callbacks.
diff --git a/chrome/browser/history/starred_url_database.cc b/chrome/browser/history/starred_url_database.cc
index 67baced..9514b04 100644
--- a/chrome/browser/history/starred_url_database.cc
+++ b/chrome/browser/history/starred_url_database.cc
@@ -17,6 +17,8 @@
#include "chrome/common/sqlite_utils.h"
#include "chrome/common/stl_util-inl.h"
+using base::Time;
+
// The following table is used to store star (aka bookmark) information. This
// class derives from URLDatabase, which has its own schema.
//
@@ -626,4 +628,3 @@ bool StarredURLDatabase::MigrateBookmarksToFileImpl(const std::wstring& path) {
}
} // namespace history
-
diff --git a/chrome/browser/history/starred_url_database.h b/chrome/browser/history/starred_url_database.h
index 87bcef4..2d09adcd 100644
--- a/chrome/browser/history/starred_url_database.h
+++ b/chrome/browser/history/starred_url_database.h
@@ -73,7 +73,7 @@ class StarredURLDatabase : public URLDatabase {
const std::wstring& title,
UIStarID parent_group_id,
int visual_order,
- Time date_modified);
+ base::Time date_modified);
// Adjusts the visual order of all children of parent_group_id with a
// visual_order >= start_visual_order by delta. For example,
@@ -91,7 +91,7 @@ class StarredURLDatabase : public URLDatabase {
UIStarID group_id,
UIStarID parent_group_id,
const std::wstring& title,
- const Time& date_added,
+ const base::Time& date_added,
int visual_order,
StarredEntry::Type type);
diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc
index 46fd8c0..ef1d706 100644
--- a/chrome/browser/history/text_database.cc
+++ b/chrome/browser/history/text_database.cc
@@ -32,6 +32,8 @@
// an FTS table that is indexed like a normal table, and the index over it is
// free since sqlite always indexes the internal rowid.
+using base::Time;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/text_database.h b/chrome/browser/history/text_database.h
index bba9a8f..5c76086 100644
--- a/chrome/browser/history/text_database.h
+++ b/chrome/browser/history/text_database.h
@@ -36,7 +36,7 @@ class TextDatabase {
std::wstring title;
// Time the page that was returned was visited.
- Time time;
+ base::Time time;
// Identifies any found matches in the title of the document. These are not
// included in the snippet.
@@ -98,13 +98,13 @@ class TextDatabase {
// Adds the given data to the page. Returns true on success. The data should
// already be converted to UTF-8.
- bool AddPageData(Time time,
+ bool AddPageData(base::Time time,
const std::string& url,
const std::string& title,
const std::string& contents);
// Deletes the indexed data exactly matching the given URL/time pair.
- void DeletePageData(Time time, const std::string& url);
+ void DeletePageData(base::Time time, const std::string& url);
// Optimizes the tree inside the database. This will, in addition to making
// access faster, remove any deleted data from the database (normally it is
@@ -133,7 +133,7 @@ class TextDatabase {
const QueryOptions& options,
std::vector<Match>* results,
URLSet* unique_urls,
- Time* first_time_searched);
+ base::Time* first_time_searched);
// Converts the given database identifier to a filename. This does not include
// the path, just the file and extension.
diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc
index e96aa5b..21a7436 100644
--- a/chrome/browser/history/text_database_manager.cc
+++ b/chrome/browser/history/text_database_manager.cc
@@ -12,6 +12,10 @@
#include "base/string_util.h"
#include "chrome/common/mru_cache.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/text_database_manager.h b/chrome/browser/history/text_database_manager.h
index 3788ee3..fc5bdae 100644
--- a/chrome/browser/history/text_database_manager.h
+++ b/chrome/browser/history/text_database_manager.h
@@ -95,7 +95,7 @@ class TextDatabaseManager {
// get updated to refer to the full text indexed information. The visit time
// should be the time corresponding to that visit in the database.
void AddPageURL(const GURL& url, URLID url_id, VisitID visit_id,
- Time visit_time);
+ base::Time visit_time);
void AddPageTitle(const GURL& url, const std::wstring& title);
void AddPageContents(const GURL& url, const std::wstring& body);
@@ -106,14 +106,14 @@ class TextDatabaseManager {
bool AddPageData(const GURL& url,
URLID url_id,
VisitID visit_id,
- Time visit_time,
+ base::Time visit_time,
const std::wstring& title,
const std::wstring& body);
// Deletes the instance of indexed data identified by the given time and URL.
// Any changes will be tracked in the optional change set for use when calling
// OptimizeChangedDatabases later. change_set can be NULL.
- void DeletePageData(Time time, const GURL& url,
+ void DeletePageData(base::Time time, const GURL& url,
ChangeSet* change_set);
// The text database manager keeps a list of changes that are made to the
@@ -124,7 +124,7 @@ class TextDatabaseManager {
//
// Either or both times my be is_null to be unbounded in that direction. When
// non-null, the range is [begin, end).
- void DeleteFromUncommitted(Time begin, Time end);
+ void DeleteFromUncommitted(base::Time begin, base::Time end);
// Same as DeleteFromUncommitted but for a single URL.
void DeleteURLFromUncommitted(const GURL& url);
@@ -149,7 +149,7 @@ class TextDatabaseManager {
void GetTextMatches(const std::wstring& query,
const QueryOptions& options,
std::vector<TextDatabase::Match>* results,
- Time* first_time_searched);
+ base::Time* first_time_searched);
private:
// These tests call ExpireRecentChangesForTime to force expiration.
@@ -161,12 +161,12 @@ class TextDatabaseManager {
// visit, title, and body all come in at different times.
class PageInfo {
public:
- PageInfo(URLID url_id, VisitID visit_id, Time visit_time);
+ PageInfo(URLID url_id, VisitID visit_id, base::Time visit_time);
// Getters.
URLID url_id() const { return url_id_; }
VisitID visit_id() const { return visit_id_; }
- Time visit_time() const { return visit_time_; }
+ base::Time visit_time() const { return visit_time_; }
const std::wstring& title() const { return title_; }
const std::wstring& body() const { return body_; }
@@ -183,7 +183,7 @@ class TextDatabaseManager {
// Returns true if this entry was added too long ago and we should give up
// waiting for more data. The current time is passed in as an argument so we
// can check many without re-querying the timer.
- bool Expired(TimeTicks now) const;
+ bool Expired(base::TimeTicks now) const;
private:
URLID url_id_;
@@ -191,11 +191,11 @@ class TextDatabaseManager {
// Time of the visit of the URL. This will be the value stored in the URL
// and visit tables for the entry.
- Time visit_time_;
+ base::Time visit_time_;
// When this page entry was created. We have a cap on the maximum time that
// an entry will be in the queue before being flushed to the database.
- TimeTicks added_time_;
+ base::TimeTicks added_time_;
// Will be the string " " when they are set to distinguish set and unset.
std::wstring title_;
@@ -203,8 +203,8 @@ class TextDatabaseManager {
};
// Converts the given time to a database identifier or vice-versa.
- static TextDatabase::DBIdent TimeToID(Time time);
- static Time IDToTime(TextDatabase::DBIdent id);
+ static TextDatabase::DBIdent TimeToID(base::Time time);
+ static base::Time IDToTime(TextDatabase::DBIdent id);
// Returns a text database for the given identifier or time. This file will
// be created if it doesn't exist and |for_writing| is set. On error,
@@ -217,7 +217,7 @@ class TextDatabaseManager {
// The pointer will be tracked in the cache. The caller should not store it
// or delete it since it will get automatically deleted as necessary.
TextDatabase* GetDB(TextDatabase::DBIdent id, bool for_writing);
- TextDatabase* GetDBForTime(Time time, bool for_writing);
+ TextDatabase* GetDBForTime(base::Time time, bool for_writing);
// Populates the present_databases_ list based on which files are on disk.
// When the list is already initialized, this will do nothing, so you can
@@ -234,7 +234,7 @@ class TextDatabaseManager {
// Given "now," this will expire old things from the recent_changes_ list.
// This is used as the backend for FlushOldChanges and is called directly
// by the unit tests with fake times.
- void FlushOldChangesForTime(TimeTicks now);
+ void FlushOldChangesForTime(base::TimeTicks now);
// Directory holding our index files.
const std::wstring dir_;
diff --git a/chrome/browser/history/text_database_manager_unittest.cc b/chrome/browser/history/text_database_manager_unittest.cc
index 8b7c6b9..fd9a46d 100644
--- a/chrome/browser/history/text_database_manager_unittest.cc
+++ b/chrome/browser/history/text_database_manager_unittest.cc
@@ -7,6 +7,10 @@
#include "chrome/browser/history/text_database_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/text_database_unittest.cc b/chrome/browser/history/text_database_unittest.cc
index 511f114..550a347 100644
--- a/chrome/browser/history/text_database_unittest.cc
+++ b/chrome/browser/history/text_database_unittest.cc
@@ -10,6 +10,8 @@
#include "chrome/browser/history/text_database.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc
index 05126b8..7cef980 100644
--- a/chrome/browser/history/thumbnail_database.cc
+++ b/chrome/browser/history/thumbnail_database.cc
@@ -13,6 +13,8 @@
#include "chrome/common/thumbnail_score.h"
#include "skia/include/SkBitmap.h"
+using base::Time;
+
namespace history {
// Version number of the database.
diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h
index f98d8e9..a72c0ef 100644
--- a/chrome/browser/history/thumbnail_database.h
+++ b/chrome/browser/history/thumbnail_database.h
@@ -15,7 +15,7 @@
struct sqlite3;
struct ThumbnailScore;
-class Time;
+class base::Time;
namespace history {
@@ -80,10 +80,10 @@ class ThumbnailDatabase {
// should be refreshed.
bool SetFavIcon(FavIconID icon_id,
const std::vector<unsigned char>& icon_data,
- Time time);
+ base::Time time);
// Sets the time the favicon was last updated.
- bool SetFavIconLastUpdateTime(FavIconID icon_id, const Time& time);
+ bool SetFavIconLastUpdateTime(FavIconID icon_id, const base::Time& time);
// Returns the id of the entry in the favicon database with the specified url.
// Returns 0 if no entry exists for the specified url.
@@ -92,7 +92,7 @@ class ThumbnailDatabase {
// Gets the png encoded favicon and last updated time for the specified
// favicon id.
bool GetFavIcon(FavIconID icon_id,
- Time* last_updated,
+ base::Time* last_updated,
std::vector<unsigned char>* png_icon_data,
GURL* icon_url);
diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc
index 34b5042..318d385 100644
--- a/chrome/browser/history/thumbnail_database_unittest.cc
+++ b/chrome/browser/history/thumbnail_database_unittest.cc
@@ -15,6 +15,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "SkBitmap.h"
+using base::Time;
+using base::TimeDelta;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc
index aeb9ed2..83b038b 100644
--- a/chrome/browser/history/url_database.cc
+++ b/chrome/browser/history/url_database.cc
@@ -12,6 +12,8 @@
#include "chrome/common/sqlite_utils.h"
#include "googleurl/src/gurl.h"
+using base::Time;
+
namespace history {
const char URLDatabase::kURLRowFields[] = HISTORY_URL_ROW_FIELDS;
diff --git a/chrome/browser/history/url_database_unittest.cc b/chrome/browser/history/url_database_unittest.cc
index b365d03..c58029d 100644
--- a/chrome/browser/history/url_database_unittest.cc
+++ b/chrome/browser/history/url_database_unittest.cc
@@ -10,6 +10,9 @@
#include "chrome/common/sqlite_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/visit_database.cc b/chrome/browser/history/visit_database.cc
index 6ab526b..fbba4d4 100644
--- a/chrome/browser/history/visit_database.cc
+++ b/chrome/browser/history/visit_database.cc
@@ -12,6 +12,8 @@
#include "chrome/browser/history/url_database.h"
#include "chrome/common/page_transition_types.h"
+using base::Time;
+
// Rows, in order, of the visit table.
#define HISTORY_VISIT_ROW_FIELDS \
" id,url,visit_time,from_visit,transition,segment_id,is_indexed "
@@ -365,4 +367,3 @@ bool VisitDatabase::GetVisitCountToHost(const GURL& url,
}
} // namespace history
-
diff --git a/chrome/browser/history/visit_database.h b/chrome/browser/history/visit_database.h
index 0e82233..137fdc0 100644
--- a/chrome/browser/history/visit_database.h
+++ b/chrome/browser/history/visit_database.h
@@ -61,8 +61,8 @@ class VisitDatabase {
// is used for history expiration.)
//
// The results will be in increasing order of date.
- void GetAllVisitsInRange(Time begin_time, Time end_time, int max_results,
- VisitVector* visits);
+ void GetAllVisitsInRange(base::Time begin_time, base::Time end_time,
+ int max_results, VisitVector* visits);
// Fills all visits in the given time range into the given vector that should
// be user-visible, which excludes things like redirects and subframes. The
@@ -75,7 +75,7 @@ class VisitDatabase {
//
// When |most_recent_visit_only| is set, only one visit for each URL will be
// returned, and it will be the most recent one in the time range.
- void GetVisibleVisitsInRange(Time begin_time, Time end_time,
+ void GetVisibleVisitsInRange(base::Time begin_time, base::Time end_time,
bool most_recent_visit_only,
int max_count,
VisitVector* visits);
@@ -116,7 +116,8 @@ class VisitDatabase {
// schemes are ignored and false is returned).
// count is set to the number of visits, first_visit is set to the first time
// the host was visited. Returns true on success.
- bool GetVisitCountToHost(const GURL& url, int* count, Time* first_visit);
+ bool GetVisitCountToHost(const GURL& url, int* count,
+ base::Time* first_visit);
protected:
// Returns the database and statement cache for the functions in this
@@ -144,4 +145,3 @@ class VisitDatabase {
} // history
#endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H__
-
diff --git a/chrome/browser/history/visit_database_unittest.cc b/chrome/browser/history/visit_database_unittest.cc
index 857c006..1992f0b 100644
--- a/chrome/browser/history/visit_database_unittest.cc
+++ b/chrome/browser/history/visit_database_unittest.cc
@@ -11,6 +11,9 @@
#include "chrome/common/sqlite_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
namespace history {
namespace {
diff --git a/chrome/browser/history/visitsegment_database.cc b/chrome/browser/history/visitsegment_database.cc
index 8754018..0da96a1 100644
--- a/chrome/browser/history/visitsegment_database.cc
+++ b/chrome/browser/history/visitsegment_database.cc
@@ -10,6 +10,8 @@
#include "chrome/common/sqlite_compiled_statement.h"
#include "chrome/common/sqlite_utils.h"
+using base::Time;
+
// The following tables are used to store url segment information.
//
// segments
@@ -386,4 +388,3 @@ bool VisitSegmentDatabase::DeleteSegmentForURL(URLID url_id) {
}
} // namespace history
-
diff --git a/chrome/browser/history/visitsegment_database.h b/chrome/browser/history/visitsegment_database.h
index 8165f88..6a4081c 100644
--- a/chrome/browser/history/visitsegment_database.h
+++ b/chrome/browser/history/visitsegment_database.h
@@ -45,17 +45,17 @@ class VisitSegmentDatabase {
// Increase the segment visit count by the provided amount. Return true on
// success.
- bool IncreaseSegmentVisitCount(SegmentID segment_id, const Time& ts,
+ bool IncreaseSegmentVisitCount(SegmentID segment_id, const base::Time& ts,
int amount);
// Compute the segment usage since |from_time| using the provided aggregator.
// A PageUsageData is added in |result| for the nine highest-scored segments.
- void QuerySegmentUsage(const Time& from_time,
+ void QuerySegmentUsage(const base::Time& from_time,
std::vector<PageUsageData*>* result);
// Delete all the segment usage data which is older than the provided time
// stamp.
- void DeleteSegmentData(const Time& older_than);
+ void DeleteSegmentData(const base::Time& older_than);
// Change the presentation id for the segment identified by |segment_id|
void SetSegmentPresentationIndex(SegmentID segment_id, int index);
diff --git a/chrome/browser/history_model.cc b/chrome/browser/history_model.cc
index 5af38d6..49102a7 100644
--- a/chrome/browser/history_model.cc
+++ b/chrome/browser/history_model.cc
@@ -7,6 +7,8 @@
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/profile.h"
+using base::Time;
+
// The max number of results to retrieve when browsing user's history.
static const int kMaxBrowseResults = 800;
diff --git a/chrome/browser/history_model.h b/chrome/browser/history_model.h
index 07e69a3..654c910 100644
--- a/chrome/browser/history_model.h
+++ b/chrome/browser/history_model.h
@@ -22,7 +22,7 @@ class HistoryModel : public BaseHistoryModel,
// BaseHistoryModel methods (see BaseHistoryModel for description).
virtual int GetItemCount();
- virtual Time GetVisitTime(int index);
+ virtual base::Time GetVisitTime(int index);
virtual const std::wstring& GetTitle(int index);
virtual const GURL& GetURL(int index);
virtual history::URLID GetURLID(int index);
@@ -83,7 +83,7 @@ class HistoryModel : public BaseHistoryModel,
int search_depth_;
// The time that the current query was started.
- Time search_start_;
+ base::Time search_start_;
DISALLOW_EVIL_CONSTRUCTORS(HistoryModel);
};
diff --git a/chrome/browser/history_view.cc b/chrome/browser/history_view.cc
index 035e5e1..266aa00 100644
--- a/chrome/browser/history_view.cc
+++ b/chrome/browser/history_view.cc
@@ -27,6 +27,9 @@
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+
// The extra-wide space between groups of entries for each new day.
static const int kDayHeadingHeight = 50;
@@ -1309,4 +1312,3 @@ gfx::Rect HistoryView::CalculateDeleteControlBounds(int base_y) {
delete_width,
kBrowseResultsHeight);
}
-
diff --git a/chrome/browser/ie7_password.h b/chrome/browser/ie7_password.h
index 2da547d..c90b8e2 100644
--- a/chrome/browser/ie7_password.h
+++ b/chrome/browser/ie7_password.h
@@ -22,7 +22,7 @@ struct IE7PasswordInfo {
std::vector<unsigned char> encrypted_data;
// When the login was imported.
- Time date_created;
+ base::Time date_created;
};
namespace ie7_password {
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index 59f1778..0594001 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -18,6 +18,8 @@
#include "generated_resources.h"
#include "net/base/data_url.h"
+using base::Time;
+
// Firefox2Importer.
Firefox2Importer::Firefox2Importer() {
@@ -512,4 +514,3 @@ void Firefox2Importer::DataURLToFaviconUsage(
favicons->push_back(usage);
}
-
diff --git a/chrome/browser/importer/firefox2_importer.h b/chrome/browser/importer/firefox2_importer.h
index 2c44993..4c55eb0 100644
--- a/chrome/browser/importer/firefox2_importer.h
+++ b/chrome/browser/importer/firefox2_importer.h
@@ -75,7 +75,7 @@ class Firefox2Importer : public Importer {
GURL* url,
GURL* favicon,
std::wstring* shortcut,
- Time* add_date,
+ base::Time* add_date,
std::wstring* post_data);
// Fetches the given attribute value from the |tag|. Returns true if
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc
index 3279130..07f9683 100644
--- a/chrome/browser/importer/firefox3_importer.cc
+++ b/chrome/browser/importer/firefox3_importer.cc
@@ -15,6 +15,8 @@
#include "chrome/common/time_format.h"
#include "generated_resources.h"
+using base::Time;
+
// Wraps the function sqlite3_close() in a class that is
// used in scoped_ptr_malloc.
@@ -499,4 +501,3 @@ void Firefox3Importer::LoadFavicons(
s.reset();
}
}
-
diff --git a/chrome/browser/importer/firefox3_importer.h b/chrome/browser/importer/firefox3_importer.h
index d4cc0bc..0accadf 100644
--- a/chrome/browser/importer/firefox3_importer.h
+++ b/chrome/browser/importer/firefox3_importer.h
@@ -48,7 +48,7 @@ class Firefox3Importer : public Importer {
std::wstring title;
int type;
std::string keyword;
- Time date_added;
+ base::Time date_added;
int64 favicon;
};
typedef std::vector<BookmarkItem*> BookmarkList;
diff --git a/chrome/browser/importer/firefox_importer_unittest.cc b/chrome/browser/importer/firefox_importer_unittest.cc
index d47b133..742a806 100644
--- a/chrome/browser/importer/firefox_importer_unittest.cc
+++ b/chrome/browser/importer/firefox_importer_unittest.cc
@@ -11,6 +11,8 @@
#include "chrome/browser/importer/firefox_profile_lock.h"
#include "chrome/common/chrome_paths.h"
+using base::Time;
+
TEST(FirefoxImporterTest, Firefox2NSS3Decryptor) {
std::wstring nss_path;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path));
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index c4505ff..19f60a1 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -25,6 +25,8 @@
#include "generated_resources.h"
+using base::Time;
+
namespace {
// Gets the creation time of the given file or directory.
diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h
index 37be870..494cf1c 100644
--- a/chrome/browser/importer/importer.h
+++ b/chrome/browser/importer/importer.h
@@ -73,7 +73,7 @@ class ProfileWriter : public base::RefCounted<ProfileWriter> {
GURL url;
std::vector<std::wstring> path;
std::wstring title;
- Time creation_time;
+ base::Time creation_time;
BookmarkEntry() : in_toolbar(false) {}
};
diff --git a/chrome/browser/importer/mork_reader.cc b/chrome/browser/importer/mork_reader.cc
index 3ae4b6c..4a9c1b2 100644
--- a/chrome/browser/importer/mork_reader.cc
+++ b/chrome/browser/importer/mork_reader.cc
@@ -49,6 +49,8 @@
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/firefox_importer_utils.h"
+using base::Time;
+
namespace {
// Convert a hex character (0-9, A-F) to its corresponding byte value.
diff --git a/chrome/browser/ipc_status_view.cc b/chrome/browser/ipc_status_view.cc
index 953f6b7..4e0e2a5 100644
--- a/chrome/browser/ipc_status_view.cc
+++ b/chrome/browser/ipc_status_view.cc
@@ -18,6 +18,8 @@
#ifdef IPC_MESSAGE_LOG_ENABLED
+using base::Time;
+
namespace {
const wchar_t kTitleMsg[] = L"IPC Messages";
diff --git a/chrome/browser/jankometer.cc b/chrome/browser/jankometer.cc
index 495b849..d67f51c 100644
--- a/chrome/browser/jankometer.cc
+++ b/chrome/browser/jankometer.cc
@@ -18,6 +18,9 @@
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_switches.h"
+using base::TimeDelta;
+using base::TimeTicks;
+
namespace {
// The maximum threshold of delay of the message before considering it a delay.
diff --git a/chrome/browser/load_notification_details.h b/chrome/browser/load_notification_details.h
index bb87436..6524399 100644
--- a/chrome/browser/load_notification_details.h
+++ b/chrome/browser/load_notification_details.h
@@ -19,7 +19,7 @@ class LoadNotificationDetails {
public:
LoadNotificationDetails(const GURL& url,
PageTransition::Type origin,
- TimeDelta load_time,
+ base::TimeDelta load_time,
NavigationController* controller,
int session_index)
: url_(url),
@@ -32,13 +32,13 @@ class LoadNotificationDetails {
const GURL& url() const { return url_; }
PageTransition::Type origin() const { return origin_; }
- TimeDelta load_time() const { return load_time_; }
+ base::TimeDelta load_time() const { return load_time_; }
int session_index() const { return session_index_; }
NavigationController* controller() const { return controller_; }
private:
GURL url_; // the URL loaded
- TimeDelta load_time_; // length of time the page load took
+ base::TimeDelta load_time_; // length of time the page load took
int session_index_; // index of the load within the tab session
PageTransition::Type origin_; // type of action that caused the load
NavigationController* controller_; // tells us which tab the load was in
diff --git a/chrome/browser/metrics_log.cc b/chrome/browser/metrics_log.cc
index a68ca2c5..908db3e 100644
--- a/chrome/browser/metrics_log.cc
+++ b/chrome/browser/metrics_log.cc
@@ -20,6 +20,9 @@
#define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name)
+using base::Time;
+using base::TimeDelta;
+
// libxml take xmlChar*, which is unsigned char*
inline const unsigned char* UnsignedChar(const char* input) {
return reinterpret_cast<const unsigned char*>(input);
@@ -642,4 +645,3 @@ void MetricsLog::RecordHistogramDelta(const Histogram& histogram,
}
}
}
-
diff --git a/chrome/browser/metrics_log.h b/chrome/browser/metrics_log.h
index 657c8d7..1be1d9f 100644
--- a/chrome/browser/metrics_log.h
+++ b/chrome/browser/metrics_log.h
@@ -57,7 +57,7 @@ class MetricsLog {
const GURL& url,
PageTransition::Type origin,
int session_index,
- TimeDelta load_time);
+ base::TimeDelta load_time);
// Records the current operating environment. Takes the list of installed
// plugins as a parameter because that can't be obtained synchronously
@@ -162,8 +162,8 @@ class MetricsLog {
void WriteProfileMetrics(const std::wstring& key,
const DictionaryValue& profile_metrics);
- Time start_time_;
- Time end_time_;
+ base::Time start_time_;
+ base::Time end_time_;
std::string client_id_;
std::string session_id_;
diff --git a/chrome/browser/metrics_log_unittest.cc b/chrome/browser/metrics_log_unittest.cc
index 489ebda..65bcdab 100644
--- a/chrome/browser/metrics_log_unittest.cc
+++ b/chrome/browser/metrics_log_unittest.cc
@@ -10,6 +10,8 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::TimeDelta;
+
namespace {
class MetricsLogTest : public testing::Test {
};
diff --git a/chrome/browser/metrics_service.cc b/chrome/browser/metrics_service.cc
index cefe611..dd9ca9b 100644
--- a/chrome/browser/metrics_service.cc
+++ b/chrome/browser/metrics_service.cc
@@ -183,6 +183,9 @@
#include "net/base/load_flags.h"
#include "third_party/bzip2/bzlib.h"
+using base::Time;
+using base::TimeDelta;
+
// Check to see that we're being called on only one thread.
static bool IsSingleThreaded();
diff --git a/chrome/browser/metrics_service.h b/chrome/browser/metrics_service.h
index 5eec5e7..fe8ce9b 100644
--- a/chrome/browser/metrics_service.h
+++ b/chrome/browser/metrics_service.h
@@ -439,7 +439,7 @@ class MetricsService : public NotificationObserver,
// outbound network link). This is usually also the duration for which we
// build up a log, but if other unsent-logs from previous sessions exist, we
// quickly transmit those unsent logs while we continue to build a log.
- TimeDelta interlog_duration_;
+ base::TimeDelta interlog_duration_;
// The maximum number of events which get transmitted in a log. This defaults
// to a constant and otherwise is provided by the UMA server in the server
diff --git a/chrome/browser/navigation_controller_unittest.cc b/chrome/browser/navigation_controller_unittest.cc
index d5d2654..5be123e 100644
--- a/chrome/browser/navigation_controller_unittest.cc
+++ b/chrome/browser/navigation_controller_unittest.cc
@@ -24,6 +24,8 @@
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+
namespace {
// NavigationControllerTest ----------------------------------------------------
diff --git a/chrome/browser/net/dns_global.cc b/chrome/browser/net/dns_global.cc
index a38819e..52bddb2a 100644
--- a/chrome/browser/net/dns_global.cc
+++ b/chrome/browser/net/dns_global.cc
@@ -21,6 +21,8 @@
#include "googleurl/src/gurl.h"
#include "net/base/dns_resolution_observer.h"
+using base::TimeDelta;
+
namespace chrome_browser_net {
static void DiscardAllPrefetchState();
diff --git a/chrome/browser/net/dns_host_info.cc b/chrome/browser/net/dns_host_info.cc
index 39dce74..777f72d 100644
--- a/chrome/browser/net/dns_host_info.cc
+++ b/chrome/browser/net/dns_host_info.cc
@@ -15,6 +15,10 @@
#include "base/logging.h"
#include "base/string_util.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
namespace chrome_browser_net {
static bool detailed_logging_enabled = false;
diff --git a/chrome/browser/net/dns_host_info.h b/chrome/browser/net/dns_host_info.h
index ee446e1..2f2a51c 100644
--- a/chrome/browser/net/dns_host_info.h
+++ b/chrome/browser/net/dns_host_info.h
@@ -44,14 +44,14 @@ class DnsHostInfo {
STARTED, // Resolution has begun.
FINISHED, // Resolution has completed.
FINISHED_UNRESOLVED}; // No resolution found.
- static const TimeDelta kMaxNonNetworkDnsLookupDuration;
+ static const base::TimeDelta kMaxNonNetworkDnsLookupDuration;
// The number of OS cache entries we can guarantee(?) before cache eviction
// might likely take place.
static const int kMaxGuaranteedCacheSize = 50;
typedef std::vector<DnsHostInfo> DnsInfoTable;
- static const TimeDelta kNullDuration;
+ static const base::TimeDelta kNullDuration;
// DnsHostInfo are usually made by the default constructor during
// initializing of the DnsMaster's map (of info for Hostnames).
@@ -71,7 +71,7 @@ class DnsHostInfo {
// on how recently we've done DNS prefetching for hostname.
bool NeedsDnsUpdate(const std::string& hostname);
- static void set_cache_expiration(TimeDelta time);
+ static void set_cache_expiration(base::TimeDelta time);
// The prefetching lifecycle.
void SetQueuedState();
@@ -102,9 +102,9 @@ class DnsHostInfo {
return (hostname == hostname_);
}
- TimeDelta resolve_duration() const { return resolve_duration_;}
- TimeDelta queue_duration() const { return queue_duration_;}
- TimeDelta benefits_remaining() const { return benefits_remaining_; }
+ base::TimeDelta resolve_duration() const { return resolve_duration_;}
+ base::TimeDelta queue_duration() const { return queue_duration_;}
+ base::TimeDelta benefits_remaining() const { return benefits_remaining_; }
DnsBenefit AcruePrefetchBenefits(DnsHostInfo* later_host_info);
@@ -117,22 +117,26 @@ class DnsHostInfo {
private:
// The next declaration is non-const to facilitate testing.
- static TimeDelta kCacheExpirationDuration;
+ static base::TimeDelta kCacheExpirationDuration;
DnsProcessingState state_;
std::string hostname_; // Hostname for this info.
- TimeTicks time_; // When was last state changed (usually lookup completed).
- TimeDelta resolve_duration_; // Time needed for DNS to resolve.
- TimeDelta queue_duration_; // Time spent in queue.
- TimeDelta benefits_remaining_; // Unused potential benefits of a prefetch.
+ // When was last state changed (usually lookup completed).
+ base::TimeTicks time_;
+ // Time needed for DNS to resolve.
+ base::TimeDelta resolve_duration_;
+ // Time spent in queue.
+ base::TimeDelta queue_duration_;
+ // Unused potential benefits of a prefetch.
+ base::TimeDelta benefits_remaining_;
int sequence_number_; // Used to calculate potential of cache eviction.
static int sequence_counter; // Used to allocate sequence_number_'s.
- TimeDelta GetDuration() {
- TimeTicks old_time = time_;
- time_ = TimeTicks::Now();
+ base::TimeDelta GetDuration() {
+ base::TimeTicks old_time = time_;
+ time_ = base::TimeTicks::Now();
return time_ - old_time;
}
@@ -147,4 +151,3 @@ class DnsHostInfo {
} // namespace chrome_browser_net
#endif // CHROME_BROWSER_NET_DNS_HOST_INFO_H_
-
diff --git a/chrome/browser/net/dns_host_info_unittest.cc b/chrome/browser/net/dns_host_info_unittest.cc
index 3ab5db7..bc04336 100644
--- a/chrome/browser/net/dns_host_info_unittest.cc
+++ b/chrome/browser/net/dns_host_info_unittest.cc
@@ -11,6 +11,8 @@
#include "chrome/browser/net/dns_host_info.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::TimeDelta;
+
namespace {
class DnsHostInfoTest : public testing::Test {
diff --git a/chrome/browser/net/dns_master.cc b/chrome/browser/net/dns_master.cc
index 2030cd4..0ea83ec 100644
--- a/chrome/browser/net/dns_master.cc
+++ b/chrome/browser/net/dns_master.cc
@@ -14,6 +14,8 @@
#include "base/win_util.h"
#include "chrome/browser/net/dns_slave.h"
+using base::TimeDelta;
+
namespace chrome_browser_net {
//------------------------------------------------------------------------------
diff --git a/chrome/browser/net/dns_master.h b/chrome/browser/net/dns_master.h
index d74773585..1da6b4f 100644
--- a/chrome/browser/net/dns_master.h
+++ b/chrome/browser/net/dns_master.h
@@ -39,7 +39,7 @@ class DnsMaster {
// The number of slave processes that will do DNS prefetching
static const int kSlaveCountMax = 8;
- explicit DnsMaster(TimeDelta shutdown_wait_time);
+ explicit DnsMaster(base::TimeDelta shutdown_wait_time);
~DnsMaster() {
if (!shutdown_)
@@ -82,14 +82,14 @@ class DnsMaster {
// Accessor methods, used mostly for testing.
// Both functions return DnsHostInfo::kNullDuration if name was not yet
// processed enough.
- TimeDelta GetResolutionDuration(const std::string hostname) {
+ base::TimeDelta GetResolutionDuration(const std::string hostname) {
AutoLock auto_lock(lock_);
if (results_.find(hostname) == results_.end())
return DnsHostInfo::kNullDuration;
return results_[hostname].resolve_duration();
}
- TimeDelta GetQueueDuration(const std::string hostname) {
+ base::TimeDelta GetQueueDuration(const std::string hostname) {
AutoLock auto_lock(lock_);
if (results_.find(hostname) == results_.end())
return DnsHostInfo::kNullDuration;
@@ -157,7 +157,7 @@ class DnsMaster {
// The following is the maximum time the ShutdownSlaves method
// will wait for all the slave processes to terminate.
- const TimeDelta kShutdownWaitTime_;
+ const base::TimeDelta kShutdownWaitTime_;
// A list of successful events resulting from pre-fetching.
DnsHostInfo::DnsInfoTable cache_hits_;
diff --git a/chrome/browser/net/dns_master_unittest.cc b/chrome/browser/net/dns_master_unittest.cc
index 1f95742..c843b36 100644
--- a/chrome/browser/net/dns_master_unittest.cc
+++ b/chrome/browser/net/dns_master_unittest.cc
@@ -21,6 +21,9 @@
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
namespace {
class DnsMasterTest : public testing::Test {
diff --git a/chrome/browser/password_form_manager.cc b/chrome/browser/password_form_manager.cc
index fa1375e9..099906d 100644
--- a/chrome/browser/password_form_manager.cc
+++ b/chrome/browser/password_form_manager.cc
@@ -12,6 +12,8 @@
#include "chrome/browser/profile.h"
#include "webkit/glue/password_form_dom_manager.h"
+using base::Time;
+
PasswordFormManager::PasswordFormManager(Profile* profile,
PasswordManager* password_manager,
const PasswordForm& observed_form,
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
index b1e2bdc..a2d07fd 100644
--- a/chrome/browser/printing/print_job.cc
+++ b/chrome/browser/printing/print_job.cc
@@ -13,6 +13,8 @@
#pragma warning(disable:4355) // 'this' : used in base member initializer list
#endif
+using base::TimeDelta;
+
namespace printing {
PrintJob::PrintJob(PrintedPagesSource* source)
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc
index 1157d64..8df4862 100644
--- a/chrome/browser/printing/print_view_manager.cc
+++ b/chrome/browser/printing/print_view_manager.cc
@@ -17,6 +17,8 @@
#include "generated_resources.h"
+using base::TimeDelta;
+
namespace printing {
PrintViewManager::PrintViewManager(WebContents& owner)
diff --git a/chrome/browser/printing/printed_document.cc b/chrome/browser/printing/printed_document.cc
index b6a5d8a..4bb9de6 100644
--- a/chrome/browser/printing/printed_document.cc
+++ b/chrome/browser/printing/printed_document.cc
@@ -21,6 +21,8 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/win_util.h"
+using base::Time;
+
namespace printing {
PrintedDocument::PrintedDocument(const PrintSettings& settings,
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc
index 7299860..fb0bf6b5 100644
--- a/chrome/browser/printing/printing_layout_uitest.cc
+++ b/chrome/browser/printing/printing_layout_uitest.cc
@@ -19,6 +19,9 @@
#include "chrome/browser/printing/printing_test.h"
#include "net/url_request/url_request_unittest.h"
+using base::Time;
+using base::TimeDelta;
+
namespace {
const wchar_t* const kGenerateSwitch = L"print-layout-generate";
diff --git a/chrome/browser/printing/win_printing_context.cc b/chrome/browser/printing/win_printing_context.cc
index badbaf2..e865b3c 100644
--- a/chrome/browser/printing/win_printing_context.cc
+++ b/chrome/browser/printing/win_printing_context.cc
@@ -12,6 +12,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/printing/print_job_manager.h"
+using base::Time;
+
namespace {
// Retrieves the content of a GetPrinter call.
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index ad84daf..6023a2c 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -40,6 +40,9 @@
#include "net/url_request/url_request_context.h"
#include "webkit/glue/webkit_glue.h"
+using base::Time;
+using base::TimeDelta;
+
// Delay, in milliseconds, before we explicitly create the SessionService.
static const int kCreateSessionServiceDelayMS = 500;
diff --git a/chrome/browser/profile.h b/chrome/browser/profile.h
index 2edc40c..27e5fcf 100644
--- a/chrome/browser/profile.h
+++ b/chrome/browser/profile.h
@@ -187,7 +187,7 @@ class Profile {
// was created, rather it is the time the user started chrome and logged into
// this profile. For the single profile case, this corresponds to the time
// the user started chrome.
- virtual Time GetStartTime() const = 0;
+ virtual base::Time GetStartTime() const = 0;
// Returns the TabRestoreService. This returns NULL when off the record.
virtual TabRestoreService* GetTabRestoreService() = 0;
@@ -253,7 +253,7 @@ class ProfileImpl : public Profile {
virtual bool DidLastSessionExitCleanly();
virtual BookmarkModel* GetBookmarkModel();
virtual bool IsSameProfile(Profile* profile);
- virtual Time GetStartTime() const;
+ virtual base::Time GetStartTime() const;
virtual TabRestoreService* GetTabRestoreService();
virtual void ResetTabRestoreService();
virtual void InitializeSpellChecker();
@@ -308,7 +308,7 @@ class ProfileImpl : public Profile {
scoped_ptr<OffTheRecordProfileImpl> off_the_record_profile_;
// See GetStartTime for details.
- Time start_time_;
+ base::Time start_time_;
scoped_ptr<TabRestoreService> tab_restore_service_;
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc
index 2c9c876..3474aa3 100644
--- a/chrome/browser/render_view_host.cc
+++ b/chrome/browser/render_view_host.cc
@@ -27,6 +27,8 @@
#include "net/base/net_util.h"
#include "skia/include/SkBitmap.h"
+using base::TimeDelta;
+
namespace {
void FilterURL(RendererSecurityPolicy* policy, int renderer_id, GURL* url) {
diff --git a/chrome/browser/render_widget_helper.cc b/chrome/browser/render_widget_helper.cc
index 3f91834..d6e2bd7 100644
--- a/chrome/browser/render_widget_helper.cc
+++ b/chrome/browser/render_widget_helper.cc
@@ -9,6 +9,9 @@
#include "chrome/browser/render_process_host.h"
#include "chrome/browser/resource_dispatcher_host.h"
+using base::TimeDelta;
+using base::TimeTicks;
+
// A Task used with InvokeLater that we hold a pointer to in pending_paints_.
// Instances are deleted by MessageLoop after it calls their Run method.
class RenderWidgetHelper::PaintMsgProxy : public Task {
@@ -228,4 +231,3 @@ void RenderWidgetHelper::OnSimulateReceivedMessage(
if (host)
host->OnMessageReceived(message);
}
-
diff --git a/chrome/browser/render_widget_helper.h b/chrome/browser/render_widget_helper.h
index 96de62a..7b6295f 100644
--- a/chrome/browser/render_widget_helper.h
+++ b/chrome/browser/render_widget_helper.h
@@ -15,9 +15,12 @@ namespace IPC {
class Message;
}
+namespace base {
+class TimeDelta;
+}
+
class MessageLoop;
class ResourceDispatcherHost;
-class TimeDelta;
// Instantiated per RenderProcessHost to provide various optimizations on
// behalf of a RenderWidgetHost. This class bridges between the IO thread
@@ -97,7 +100,7 @@ class RenderWidgetHelper :
// Called on the UI thread to wait for the next PaintRect message for the
// specified render widget. Returns true if successful, and the msg out-
// param will contain a copy of the received PaintRect message.
- bool WaitForPaintMsg(int render_widget_id, const TimeDelta& max_delay,
+ bool WaitForPaintMsg(int render_widget_id, const base::TimeDelta& max_delay,
IPC::Message* msg);
diff --git a/chrome/browser/render_widget_host.cc b/chrome/browser/render_widget_host.cc
index 2966b6c..281d6aa46 100644
--- a/chrome/browser/render_widget_host.cc
+++ b/chrome/browser/render_widget_host.cc
@@ -16,6 +16,10 @@
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webinputevent.h"
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
// How long to (synchronously) wait for the renderer to respond with a
// PaintRect message, when our backing-store is invalid, before giving up and
// returning a null or incorrectly sized backing-store from GetBackingStore.
@@ -834,5 +838,3 @@ void RenderWidgetHost::RendererExited() {
void RenderWidgetHost::SystemThemeChanged() {
Send(new ViewMsg_ThemeChanged(routing_id_));
}
-
-
diff --git a/chrome/browser/render_widget_host.h b/chrome/browser/render_widget_host.h
index a581604..4b1ffcc1 100644
--- a/chrome/browser/render_widget_host.h
+++ b/chrome/browser/render_widget_host.h
@@ -194,7 +194,7 @@ class RenderWidgetHost : public IPC::Channel::Listener {
// Starts a hang monitor timeout. If there's already a hang monitor timeout
// the new one will only fire if it has a shorter delay than the time
// left on the existing timeouts.
- void StartHangMonitorTimeout(TimeDelta delay);
+ void StartHangMonitorTimeout(base::TimeDelta delay);
// Called when we receive a notification indicating that the renderer
// process has gone.
@@ -282,7 +282,7 @@ class RenderWidgetHost : public IPC::Channel::Listener {
RenderWidgetHostView* view_;
// The time when an input event was sent to the RenderWidget.
- TimeTicks input_event_start_time_;
+ base::TimeTicks input_event_start_time_;
// Indicates whether a page is loading or not.
bool is_loading_;
@@ -300,7 +300,7 @@ class RenderWidgetHost : public IPC::Channel::Listener {
// The following value indicates a time in the future when we would consider
// the renderer hung if it does not generate an appropriate response message.
- Time time_when_considered_hung_;
+ base::Time time_when_considered_hung_;
// This timer runs to check if time_when_considered_hung_ has past.
base::OneShotTimer<RenderWidgetHost> hung_renderer_timer_;
@@ -319,7 +319,7 @@ class RenderWidgetHost : public IPC::Channel::Listener {
// Used for UMA histogram logging to measure the time for a repaint view
// operation to finish.
- TimeTicks repaint_start_time_;
+ base::TimeTicks repaint_start_time_;
DISALLOW_EVIL_CONSTRUCTORS(RenderWidgetHost);
};
diff --git a/chrome/browser/render_widget_host_view_win.cc b/chrome/browser/render_widget_host_view_win.cc
index 6d60b5d..05eb2a2 100644
--- a/chrome/browser/render_widget_host_view_win.cc
+++ b/chrome/browser/render_widget_host_view_win.cc
@@ -26,6 +26,9 @@
#include "chrome/views/container_win.h"
#include "webkit/glue/webcursor.h"
+using base::TimeDelta;
+using base::TimeTicks;
+
namespace {
// Tooltips will wrap after this width. Yes, wrap. Imagine that!
diff --git a/chrome/browser/render_widget_host_view_win.h b/chrome/browser/render_widget_host_view_win.h
index c47ca74..348e21c 100644
--- a/chrome/browser/render_widget_host_view_win.h
+++ b/chrome/browser/render_widget_host_view_win.h
@@ -257,7 +257,7 @@ class RenderWidgetHostViewWin :
// The time at which this view started displaying white pixels as a result of
// not having anything to paint (empty backing store from renderer). This
// value returns true for is_null() if we are not recording whiteout times.
- TimeTicks whiteout_start_time_;
+ base::TimeTicks whiteout_start_time_;
// Whether the renderer is made accessible.
// TODO(jcampan): http://b/issue?id=1432077 This is a temporary work-around
diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc
index 85a0fb8..edc9aca 100644
--- a/chrome/browser/resource_dispatcher_host.cc
+++ b/chrome/browser/resource_dispatcher_host.cc
@@ -50,6 +50,10 @@
# define RESOURCE_LOG(stuff)
#endif
+using base::Time;
+using base::TimeDelta;
+using base::TimeTicks;
+
// ----------------------------------------------------------------------------
// The interval for calls to ResourceDispatcherHost::UpdateLoadStates
diff --git a/chrome/browser/resource_dispatcher_host.h b/chrome/browser/resource_dispatcher_host.h
index d77454c..3207965 100644
--- a/chrome/browser/resource_dispatcher_host.h
+++ b/chrome/browser/resource_dispatcher_host.h
@@ -178,7 +178,7 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
uint64 last_upload_position;
- TimeTicks last_upload_ticks;
+ base::TimeTicks last_upload_ticks;
bool waiting_for_upload_progress_ack;
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc
index f531538..fb3c967 100644
--- a/chrome/browser/safe_browsing/protocol_manager.cc
+++ b/chrome/browser/safe_browsing/protocol_manager.cc
@@ -21,6 +21,8 @@
#include "net/base/base64.h"
#include "net/base/load_flags.h"
+using base::Time;
+using base::TimeDelta;
// Maximum time, in seconds, from start up before we must issue an update query.
static const int kSbTimerStartIntervalSec = 5 * 60;
diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h
index 4cb75c0..ae89319 100644
--- a/chrome/browser/safe_browsing/protocol_manager.h
+++ b/chrome/browser/safe_browsing/protocol_manager.h
@@ -74,7 +74,7 @@ class SafeBrowsingProtocolManager : public URLFetcher::Delegate {
void OnChunkInserted();
// The last time we received an update.
- Time last_update() const { return last_update_; }
+ base::Time last_update() const { return last_update_; }
private:
// Internal API for fetching information from the SafeBrowsing servers. The
@@ -196,10 +196,10 @@ class SafeBrowsingProtocolManager : public URLFetcher::Delegate {
std::string wrapped_key_;
// The last time we successfully received an update.
- Time last_update_;
+ base::Time last_update_;
// While in GetHash backoff, we can't make another GetHash until this time.
- Time next_gethash_time_;
+ base::Time next_gethash_time_;
// Current product version sent in each request.
std::string version_;
diff --git a/chrome/browser/safe_browsing/protocol_manager_unittest.cc b/chrome/browser/safe_browsing/protocol_manager_unittest.cc
index 3a81c91..25af2b3 100644
--- a/chrome/browser/safe_browsing/protocol_manager_unittest.cc
+++ b/chrome/browser/safe_browsing/protocol_manager_unittest.cc
@@ -8,6 +8,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "chrome/browser/safe_browsing/protocol_manager.h"
+using base::Time;
+using base::TimeDelta;
+
class SafeBrowsingProtocolManagerTest : public testing::Test {
};
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc
index 2f43f6b..92961c3 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database.cc
@@ -13,6 +13,8 @@
#include "chrome/common/chrome_switches.h"
#include "googleurl/src/gurl.h"
+using base::Time;
+
// Filename suffix for the bloom filter.
static const wchar_t kBloomFilterFile[] = L" Filter";
@@ -98,4 +100,3 @@ void SafeBrowsingDatabase::WriteBloomFilter() {
SB_DLOG(INFO) << "SafeBrowsingDatabase wrote bloom filter in " <<
(Time::Now() - before).InMilliseconds() << " ms";
}
-
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h
index 94b9b76..f4c692a 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database.h
@@ -52,7 +52,7 @@ class SafeBrowsingDatabase {
std::string* matching_list,
std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits,
- Time last_update) = 0;
+ base::Time last_update) = 0;
// Processes add/sub commands. Database will free the chunks when it's done.
virtual void InsertChunks(const std::string& list_name,
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
index 9b15082..d04826d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
@@ -17,6 +17,9 @@
#include "chrome/common/sqlite_utils.h"
#include "googleurl/src/gurl.h"
+using base::Time;
+using base::TimeDelta;
+
// Database version. If this is different than what's stored on disk, the
// database is reset.
static const int kDatabaseVersion = 6;
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_bloom.h b/chrome/browser/safe_browsing/safe_browsing_database_bloom.h
index f639943..8f5fbe1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_bloom.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database_bloom.h
@@ -44,7 +44,7 @@ class SafeBrowsingDatabaseBloom : public SafeBrowsingDatabase {
std::string* matching_list,
std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits,
- Time last_update);
+ base::Time last_update);
// Processes add/sub commands. Database will free the chunks when it's done.
virtual void InsertChunks(const std::string& list_name,
@@ -147,7 +147,7 @@ class SafeBrowsingDatabaseBloom : public SafeBrowsingDatabase {
// Looks up any cached full hashes we may have.
void GetCachedFullHashes(const std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits,
- Time last_update);
+ base::Time last_update);
// Remove cached entries that have prefixes contained in the entry.
void ClearCachedHashes(const SBEntry* entry);
@@ -238,7 +238,7 @@ class SafeBrowsingDatabaseBloom : public SafeBrowsingDatabase {
SBFullHash full_hash;
int list_id;
int add_chunk_id;
- Time received;
+ base::Time received;
} HashCacheEntry;
typedef std::list<HashCacheEntry> HashList;
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_impl.cc b/chrome/browser/safe_browsing/safe_browsing_database_impl.cc
index 5d1c758..db25ec7 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_impl.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_impl.cc
@@ -17,6 +17,9 @@
#include "chrome/common/sqlite_utils.h"
#include "googleurl/src/gurl.h"
+using base::Time;
+using base::TimeDelta;
+
// Database version. If this is different than what's stored on disk, the
// database is reset.
static const int kDatabaseVersion = 4;
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_impl.h b/chrome/browser/safe_browsing/safe_browsing_database_impl.h
index 67f44ea..4c46b75 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_impl.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database_impl.h
@@ -46,7 +46,7 @@ class SafeBrowsingDatabaseImpl : public SafeBrowsingDatabase {
std::string* matching_list,
std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits,
- Time last_update);
+ base::Time last_update);
// Processes add/sub commands. Database will free the chunks when it's done.
virtual void InsertChunks(const std::string& list_name,
@@ -185,7 +185,7 @@ class SafeBrowsingDatabaseImpl : public SafeBrowsingDatabase {
// Looks up any cached full hashes we may have.
void GetCachedFullHashes(const std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits,
- Time last_update);
+ base::Time last_update);
// Remove cached entries that have prefixes contained in the entry.
void ClearCachedHashes(const SBEntry* entry);
@@ -225,7 +225,7 @@ class SafeBrowsingDatabaseImpl : public SafeBrowsingDatabase {
// These are temp variables used when rebuilding the bloom filter.
bool bloom_filter_building_;
std::vector<int> bloom_filter_temp_hostkeys_;
- Time bloom_filter_rebuild_time_;
+ base::Time bloom_filter_rebuild_time_;
// Used to store throttled work for commands that write to the database.
std::queue<std::deque<SBChunk>*> pending_chunks_;
@@ -264,7 +264,7 @@ class SafeBrowsingDatabaseImpl : public SafeBrowsingDatabase {
SBFullHash full_hash;
int list_id;
int add_chunk_id;
- Time received;
+ base::Time received;
} HashCacheEntry;
typedef std::list<HashCacheEntry> HashList;
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_impl_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_impl_unittest.cc
index 3afcedc..614fa1b 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_impl_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_impl_unittest.cc
@@ -18,6 +18,9 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
namespace {
SBPrefix Sha256Prefix(const std::string& str) {
SBPrefix hash;
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 2c37c14..43249a5 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -17,6 +17,8 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+
static const wchar_t kSafeBrowsingTestDatabase[] = L"SafeBrowsingTestDatabase";
namespace {
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 9f6419c..1382a5f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -23,6 +23,9 @@
#include "chrome/common/pref_service.h"
#include "net/base/registry_controlled_domain.h"
+using base::Time;
+using base::TimeDelta;
+
SafeBrowsingService::SafeBrowsingService()
: io_loop_(NULL),
database_(NULL),
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index dd2c818..8a87726 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -119,8 +119,8 @@ class SafeBrowsingService
GURL url;
Client* client;
bool need_get_hash;
- Time start; // Time that check was sent to SB service.
- TimeDelta db_time; // How long DB look-up took.
+ base::Time start; // Time that check was sent to SB service.
+ base::TimeDelta db_time; // How long DB look-up took.
UrlCheckResult result;
std::vector<SBPrefix> prefix_hits;
std::vector<SBFullHashResult> full_hits;
@@ -165,7 +165,7 @@ class SafeBrowsingService
// delta starting from when we would have started reading data from the
// network, and ending when the SafeBrowsing check completes indicating that
// the current page is 'safe'.
- static void LogPauseDelay(TimeDelta time);
+ static void LogPauseDelay(base::TimeDelta time);
// We defer SafeBrowsing work for a short duration when the computer comes
// out of a suspend state to avoid thrashing the disk.
@@ -178,7 +178,7 @@ class SafeBrowsingService
SafeBrowsingDatabase* GetDatabase();
// Called on the database thread to check a url.
- void CheckDatabase(SafeBrowsingCheck* info, Time last_update);
+ void CheckDatabase(SafeBrowsingCheck* info, base::Time last_update);
// Called on the IO thread with the check result.
void OnCheckDone(SafeBrowsingCheck* info);
@@ -287,7 +287,7 @@ class SafeBrowsingService
typedef struct {
Client* client;
GURL url;
- Time start;
+ base::Time start;
} QueuedCheck;
std::deque<QueuedCheck> queued_checks_;
diff --git a/chrome/browser/session_backend.cc b/chrome/browser/session_backend.cc
index fd9086a..0f1f863 100644
--- a/chrome/browser/session_backend.cc
+++ b/chrome/browser/session_backend.cc
@@ -11,6 +11,8 @@
#include "base/pickle.h"
#include "chrome/common/scoped_vector.h"
+using base::TimeTicks;
+
// File version number.
static const int32 kFileCurrentVersion = 1;
@@ -375,4 +377,3 @@ std::wstring SessionBackend::GetCurrentSessionPath() {
file_util::AppendToPath(&path, kCurrentSessionFileName);
return path;
}
-
diff --git a/chrome/browser/session_service.cc b/chrome/browser/session_service.cc
index 6b44952..25e0174 100644
--- a/chrome/browser/session_service.cc
+++ b/chrome/browser/session_service.cc
@@ -24,6 +24,8 @@
#include "chrome/common/scoped_vector.h"
#include "chrome/common/win_util.h"
+using base::Time;
+
// Identifier for commands written to file.
static const SessionCommand::id_type kCommandSetTabWindow = 0;
// kCommandSetWindowBounds is no longer used (it's superseded by
diff --git a/chrome/browser/session_service_test_helper.cc b/chrome/browser/session_service_test_helper.cc
index 49cedd8..384e30c 100644
--- a/chrome/browser/session_service_test_helper.cc
+++ b/chrome/browser/session_service_test_helper.cc
@@ -9,6 +9,8 @@
#include "chrome/common/scoped_vector.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+
void SessionServiceTestHelper::RestoreSessionFromCommands(
const std::vector<SessionCommand*>& commands,
std::vector<SessionWindow*>* valid_windows) {
diff --git a/chrome/browser/spellchecker.cc b/chrome/browser/spellchecker.cc
index e6cfc75..df0c900 100644
--- a/chrome/browser/spellchecker.cc
+++ b/chrome/browser/spellchecker.cc
@@ -30,6 +30,8 @@
#include "generated_resources.h"
+using base::TimeTicks;
+
static const int kMaxSuggestions = 5; // Max number of dictionary suggestions.
// This is a helper class which acts as a proxy for invoking a task from the
diff --git a/chrome/browser/tab_restore_service.cc b/chrome/browser/tab_restore_service.cc
index 9b3bd4a..324273b 100644
--- a/chrome/browser/tab_restore_service.cc
+++ b/chrome/browser/tab_restore_service.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/navigation_controller.h"
#include "chrome/browser/navigation_entry.h"
+using base::Time;
+
// HistoricalTab --------------------------------------------------------------
// ID of the next HistoricalTab.
@@ -179,4 +181,3 @@ void TabRestoreService::PopulateTabFromSessionTab(
void TabRestoreService::NotifyTabsChanged() {
FOR_EACH_OBSERVER(Observer, observer_list_, TabRestoreServiceChanged(this));
}
-
diff --git a/chrome/browser/tab_restore_service.h b/chrome/browser/tab_restore_service.h
index a83a9d9..66157f4 100644
--- a/chrome/browser/tab_restore_service.h
+++ b/chrome/browser/tab_restore_service.h
@@ -48,7 +48,7 @@ class TabRestoreService {
HistoricalTab();
// Time the tab was closed.
- Time close_time;
+ base::Time close_time;
// If true, this is a historical session and not a closed tab.
bool from_last_session;
diff --git a/chrome/browser/template_url.h b/chrome/browser/template_url.h
index bbb752e..7be7d0b 100644
--- a/chrome/browser/template_url.h
+++ b/chrome/browser/template_url.h
@@ -255,7 +255,7 @@ class TemplateURL {
show_in_default_list_(false),
safe_for_autoreplace_(false),
id_(0),
- date_created_(Time::Now()),
+ date_created_(base::Time::Now()),
usage_count_(0),
prepopulate_id_(0) {}
~TemplateURL() {}
@@ -368,8 +368,8 @@ class TemplateURL {
//
// NOTE: this may be 0, which indicates the keyword was created before we
// started tracking creation time.
- void set_date_created(Time time) { date_created_ = time; }
- Time date_created() const { return date_created_; }
+ void set_date_created(base::Time time) { date_created_ = time; }
+ base::Time date_created() const { return date_created_; }
// Number of times this keyword has been explicitly used to load a URL. We
// don't increment this for uses as the "default search engine" since that's
@@ -425,7 +425,7 @@ class TemplateURL {
// List of supported input encodings.
std::vector<std::string> input_encodings_;
IDType id_;
- Time date_created_;
+ base::Time date_created_;
int usage_count_;
int prepopulate_id_;
diff --git a/chrome/browser/template_url_model.cc b/chrome/browser/template_url_model.cc
index ca0cedf..587f982 100644
--- a/chrome/browser/template_url_model.cc
+++ b/chrome/browser/template_url_model.cc
@@ -26,6 +26,8 @@
#include "unicode/rbbi.h"
#include "unicode/uchar.h"
+using base::Time;
+
// String in the URL that is replaced by the search term.
static const wchar_t kSearchTermParameter[] = L"{searchTerms}";
@@ -973,4 +975,3 @@ void TemplateURLModel::GoogleBaseURLChanged() {
OnTemplateURLModelChanged());
}
}
-
diff --git a/chrome/browser/template_url_model.h b/chrome/browser/template_url_model.h
index 8fd65a7..6b9569b 100644
--- a/chrome/browser/template_url_model.h
+++ b/chrome/browser/template_url_model.h
@@ -123,7 +123,7 @@ class TemplateURLModel : public WebDataServiceConsumer,
// Removes all auto-generated keywords that were created in the specified
// range.
- void RemoveAutoGeneratedBetween(Time created_after, Time created_before);
+ void RemoveAutoGeneratedBetween(base::Time created_after, base::Time created_before);
// Replaces existing_turl with new_turl. new_turl is given the same ID as
// existing_turl. If existing_turl was the default, new_turl is made the
@@ -134,7 +134,7 @@ class TemplateURLModel : public WebDataServiceConsumer,
// Removes all auto-generated keywords that were created on or after the
// date passed in.
- void RemoveAutoGeneratedSince(Time created_after);
+ void RemoveAutoGeneratedSince(base::Time created_after);
// Returns the set of URLs describing the keywords. The elements are owned
// by TemplateURLModel and should not be deleted.
diff --git a/chrome/browser/template_url_model_unittest.cc b/chrome/browser/template_url_model_unittest.cc
index b81e892..3c17ff2 100644
--- a/chrome/browser/template_url_model_unittest.cc
+++ b/chrome/browser/template_url_model_unittest.cc
@@ -15,6 +15,9 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
// A Task used to coordinate when the database has finished processing
// requests. See note in BlockTillServiceProcessesRequests for details.
//
@@ -630,4 +633,3 @@ TEST_F(TemplateURLModelTest, ChangeGoogleBaseValue) {
EXPECT_EQ(L"http://foo.com/?q=x", t_url->url()->ReplaceSearchTerms(*t_url,
L"x", TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring()));
}
-
diff --git a/chrome/browser/template_url_prepopulate_data.cc b/chrome/browser/template_url_prepopulate_data.cc
index fd9f739..8ddf818 100644
--- a/chrome/browser/template_url_prepopulate_data.cc
+++ b/chrome/browser/template_url_prepopulate_data.cc
@@ -11,6 +11,8 @@
#include "chrome/common/pref_service.h"
#undef IN // On Windows, windef.h defines this, which screws up "India" cases.
+using base::Time;
+
namespace {
// NOTE: See comments in GetDataVersion() below! You should probably not change
diff --git a/chrome/browser/url_fetcher_protect.cc b/chrome/browser/url_fetcher_protect.cc
index 297a9bb..b19be608 100644
--- a/chrome/browser/url_fetcher_protect.cc
+++ b/chrome/browser/url_fetcher_protect.cc
@@ -6,6 +6,8 @@
// URLFetcherProtectEntry ----------------------------------------------------
+using base::TimeDelta;
+using base::TimeTicks;
// Default parameters. Time is in milliseconds.
// static
@@ -169,4 +171,3 @@ URLFetcherProtectEntry* URLFetcherProtectManager::Register(
services_[id] = entry;
return entry;
}
-
diff --git a/chrome/browser/url_fetcher_protect.h b/chrome/browser/url_fetcher_protect.h
index 6e4080d..794418b 100644
--- a/chrome/browser/url_fetcher_protect.h
+++ b/chrome/browser/url_fetcher_protect.h
@@ -64,13 +64,13 @@ class URLFetcherProtectEntry {
private:
// When a request comes, calculate the release time for it.
// Returns the backoff time before sending.
- TimeDelta AntiOverload();
+ base::TimeDelta AntiOverload();
// Resets backoff when service is ok.
// Returns the backoff time before sending.
- TimeDelta ResetBackoff();
+ base::TimeDelta ResetBackoff();
// Calculates new backoff when encountering a failure.
// Returns the backoff time before sending.
- TimeDelta IncreaseBackoff();
+ base::TimeDelta IncreaseBackoff();
// Default parameters. Time is in milliseconds.
static const int kDefaultSlidingWindowPeriod;
@@ -101,14 +101,14 @@ class URLFetcherProtectEntry {
// current exponential backoff period
int timeout_period_;
// time that protection is scheduled to end
- TimeTicks release_time_;
+ base::TimeTicks release_time_;
// Sets up a lock to ensure thread safe.
Lock lock_;
// A list of the recent send events. We ues them to decide whether
// there are too many requests sent in sliding window.
- std::queue<TimeTicks> send_log_;
+ std::queue<base::TimeTicks> send_log_;
DISALLOW_COPY_AND_ASSIGN(URLFetcherProtectEntry);
};
diff --git a/chrome/browser/url_fetcher_unittest.cc b/chrome/browser/url_fetcher_unittest.cc
index 2ae69aa..e8f7417 100644
--- a/chrome/browser/url_fetcher_unittest.cc
+++ b/chrome/browser/url_fetcher_unittest.cc
@@ -9,6 +9,9 @@
#include "net/url_request/url_request_unittest.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
namespace {
const wchar_t kDocRoot[] = L"chrome/test/data";
diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc
index 0aefa26..8eb7979 100644
--- a/chrome/browser/views/bookmark_editor_view.cc
+++ b/chrome/browser/views/bookmark_editor_view.cc
@@ -23,6 +23,7 @@
#include "chromium_strings.h"
#include "generated_resources.h"
+using base::Time;
using views::ColumnSet;
using views::GridLayout;
using views::Label;
diff --git a/chrome/browser/views/bookmark_editor_view_unittest.cc b/chrome/browser/views/bookmark_editor_view_unittest.cc
index 767d501..0a5ed68 100644
--- a/chrome/browser/views/bookmark_editor_view_unittest.cc
+++ b/chrome/browser/views/bookmark_editor_view_unittest.cc
@@ -11,6 +11,9 @@
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
// Base class for bookmark editor tests. Creates a BookmarkModel and populates
// it with test data.
class BookmarkEditorViewTest : public testing::Test {
diff --git a/chrome/browser/views/clear_browsing_data.cc b/chrome/browser/views/clear_browsing_data.cc
index c4c88f4..4a948f8 100644
--- a/chrome/browser/views/clear_browsing_data.cc
+++ b/chrome/browser/views/clear_browsing_data.cc
@@ -21,6 +21,9 @@
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+
// The combo box is vertically aligned to the 'time-period' label, which makes
// the combo box look a little too close to the check box above it when we use
// standard layout to separate them. We therefore add a little extra margin to
@@ -420,4 +423,3 @@ void ClearBrowsingDataView::OnBrowsingDataRemoverDone() {
remover_ = NULL;
window()->Close();
}
-
diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc
index d74ac05..bdd6d0f 100644
--- a/chrome/browser/views/constrained_window_impl.cc
+++ b/chrome/browser/views/constrained_window_impl.cc
@@ -38,6 +38,8 @@
#include "chromium_strings.h"
#include "generated_resources.h"
+using base::TimeDelta;
+
namespace views {
class ClientView;
}
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index e42b7e6..bc81238 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -22,6 +22,8 @@
#include "generated_resources.h"
+using base::TimeDelta;
+
// TODO(paulg): These may need to be adjusted when download progress
// animation is added, and also possibly to take into account
// different screen resolutions.
diff --git a/chrome/browser/views/download_tab_view.cc b/chrome/browser/views/download_tab_view.cc
index 15b43b6..38ca746 100644
--- a/chrome/browser/views/download_tab_view.cc
+++ b/chrome/browser/views/download_tab_view.cc
@@ -28,6 +28,9 @@
#include "googleurl/src/gurl.h"
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+
// Approximate spacing, in pixels, taken from initial UI mock up screens
static const int kVerticalPadding = 5;
static const int kHorizontalLinkPadding = 15;
@@ -1303,4 +1306,3 @@ void DownloadTabUI::Observe(NotificationType type,
break;
}
}
-
diff --git a/chrome/browser/views/external_protocol_dialog.h b/chrome/browser/views/external_protocol_dialog.h
index 2247765..db23116 100644
--- a/chrome/browser/views/external_protocol_dialog.h
+++ b/chrome/browser/views/external_protocol_dialog.h
@@ -66,4 +66,3 @@ class ExternalProtocolDialog : public views::DialogDelegate {
};
#endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_DIALOG_H__
-
diff --git a/chrome/browser/views/page_info_window.cc b/chrome/browser/views/page_info_window.cc
index dce5640..d724132 100644
--- a/chrome/browser/views/page_info_window.cc
+++ b/chrome/browser/views/page_info_window.cc
@@ -33,6 +33,8 @@
#include "skia/include/SkColor.h"
#include "generated_resources.h"
+using base::Time;
+
const int kVerticalPadding = 10;
const int kHorizontalPadding = 10;
diff --git a/chrome/browser/views/shelf_item_dialog.cc b/chrome/browser/views/shelf_item_dialog.cc
index bb3a056..5ea98a3 100644
--- a/chrome/browser/views/shelf_item_dialog.cc
+++ b/chrome/browser/views/shelf_item_dialog.cc
@@ -26,6 +26,8 @@
#include "generated_resources.h"
#include "net/base/net_util.h"
+using base::Time;
+using base::TimeDelta;
using views::ColumnSet;
using views::GridLayout;
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 72f7d28..a1e1e41 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -32,6 +32,7 @@
#undef min
#undef max
+using base::TimeDelta;
using views::DropTargetEvent;
static const int kDefaultAnimationDurationMs = 100;
diff --git a/chrome/browser/views/toolbar_star_toggle.cc b/chrome/browser/views/toolbar_star_toggle.cc
index a44ebac..fe72283 100644
--- a/chrome/browser/views/toolbar_star_toggle.cc
+++ b/chrome/browser/views/toolbar_star_toggle.cc
@@ -12,6 +12,8 @@
#include "chrome/common/resource_bundle.h"
#include "googleurl/src/gurl.h"
+using base::TimeTicks;
+
// The amount of time (in milliseconds) between when the bubble closes and when
// pressing on the button again does something. Yes, this is a hackish. I tried
// many different options, all to no avail:
@@ -88,4 +90,3 @@ void ToolbarStarToggle::InfoBubbleClosing(InfoBubble* info_bubble) {
bool ToolbarStarToggle::CloseOnEscape() {
return true;
}
-
diff --git a/chrome/browser/views/toolbar_star_toggle.h b/chrome/browser/views/toolbar_star_toggle.h
index 5f829cb..9537506 100644
--- a/chrome/browser/views/toolbar_star_toggle.h
+++ b/chrome/browser/views/toolbar_star_toggle.h
@@ -50,7 +50,7 @@ class ToolbarStarToggle : public views::ToggleButton,
BrowserToolbarView* host_;
// Time the bubble last closed.
- TimeTicks bubble_closed_time_;
+ base::TimeTicks bubble_closed_time_;
// If true NotifyClick does nothing. This is set in OnMousePressed based on
// the amount of time between when the bubble clicked and now.
diff --git a/chrome/browser/visitedlink_perftest.cc b/chrome/browser/visitedlink_perftest.cc
index 4f7dc4a..0f02a5a 100644
--- a/chrome/browser/visitedlink_perftest.cc
+++ b/chrome/browser/visitedlink_perftest.cc
@@ -14,6 +14,8 @@
#include "chrome/test/test_file_util.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::TimeDelta;
+
namespace {
// how we generate URLs, note that the two strings should be the same length
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc
index 082852c..1c27a0d 100644
--- a/chrome/browser/web_contents.cc
+++ b/chrome/browser/web_contents.cc
@@ -86,6 +86,9 @@
// DidNavigate method. This replaces the current RVH with the
// pending RVH and goes back to the NORMAL RendererState.
+using base::TimeDelta;
+using base::TimeTicks;
+
namespace {
// Amount of time we wait between when a key event is received and the renderer
diff --git a/chrome/browser/web_contents.h b/chrome/browser/web_contents.h
index f73bb97..705d027 100644
--- a/chrome/browser/web_contents.h
+++ b/chrome/browser/web_contents.h
@@ -490,7 +490,7 @@ class WebContents : public TabContents,
HistoryRequestMap history_requests_;
// System time at which the current load was started.
- TimeTicks current_load_start_;
+ base::TimeTicks current_load_start_;
// Whether we have a (non-empty) title for the current page.
// Used to prevent subsequent title updates from affecting history. This
@@ -527,7 +527,7 @@ class WebContents : public TabContents,
scoped_refptr<SelectFileDialog> select_file_dialog_;
// The time that the last javascript message was dismissed.
- TimeTicks last_javascript_message_dismissal_;
+ base::TimeTicks last_javascript_message_dismissal_;
// True if the user has decided to block future javascript messages. This is
// reset on navigations to false on navigations.
@@ -543,7 +543,7 @@ class WebContents : public TabContents,
PendingInstall pending_install_;
// The last time that the download shelf was made visible.
- TimeTicks last_download_shelf_show_;
+ base::TimeTicks last_download_shelf_show_;
// The current load state and the URL associated with it.
net::LoadState load_state_;
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
index 48eebd8..fd0e60a 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -20,6 +20,8 @@
//
////////////////////////////////////////////////////////////////////////////////
+using base::Time;
+
WebDataService::WebDataService() : should_commit_(false),
next_request_handle_(1),
thread_(NULL),
diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h
index d7e428d..25a4e27 100644
--- a/chrome/browser/webdata/web_data_service.h
+++ b/chrome/browser/webdata/web_data_service.h
@@ -314,11 +314,11 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> {
void RemoveIE7Login(const IE7PasswordInfo& info);
// Removes all logins created in the specified daterange
- void RemoveLoginsCreatedBetween(const Time delete_begin,
- const Time delete_end);
+ void RemoveLoginsCreatedBetween(const base::Time delete_begin,
+ const base::Time delete_end);
// Removes all logins created on or after the date passed in.
- void RemoveLoginsCreatedAfter(const Time delete_begin);
+ void RemoveLoginsCreatedAfter(const base::Time delete_begin);
// Gets a list of password forms that match |form|.
// |consumer| will be notified when the request is done. The result is of
@@ -407,7 +407,8 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> {
void UpdateLoginImpl(GenericRequest<PasswordForm>* request);
void RemoveLoginImpl(GenericRequest<PasswordForm>* request);
void RemoveIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
- void RemoveLoginsCreatedBetweenImpl(GenericRequest2<Time, Time>* request);
+ void RemoveLoginsCreatedBetweenImpl(
+ GenericRequest2<base::Time, base::Time>* request);
void GetLoginsImpl(GenericRequest<PasswordForm>* request);
void GetIE7LoginImpl(GenericRequest<IE7PasswordInfo>* request);
void GetAllAutofillableLoginsImpl(WebDataRequest* request);
@@ -481,4 +482,3 @@ class WebDataServiceConsumer {
};
#endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
-
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc
index 04be9fc..5e14723 100644
--- a/chrome/browser/webdata/web_database.cc
+++ b/chrome/browser/webdata/web_database.cc
@@ -73,6 +73,8 @@
//
////////////////////////////////////////////////////////////////////////////////
+using base::Time;
+
// Current version number.
static const int kCurrentVersionNumber = 21;
@@ -883,4 +885,3 @@ void WebDatabase::MigrateOldVersionsAsNeeded() {
return;
}
}
-
diff --git a/chrome/browser/webdata/web_database.h b/chrome/browser/webdata/web_database.h
index 176e70f..386bf6c 100644
--- a/chrome/browser/webdata/web_database.h
+++ b/chrome/browser/webdata/web_database.h
@@ -14,7 +14,7 @@
#include "chrome/common/sqlite_utils.h"
#include "skia/include/SkBitmap.h"
-class Time;
+class base::Time;
struct PasswordForm;
struct IE7PasswordInfo;
@@ -91,8 +91,8 @@ class WebDatabase {
// Removes all logins created from |delete_begin| onwards (inclusive) and
// before |delete_end|. You may use a null Time value to do an unbounded
// delete in either direction.
- bool RemoveLoginsCreatedBetween(const Time delete_begin,
- const Time delete_end);
+ bool RemoveLoginsCreatedBetween(const base::Time delete_begin,
+ const base::Time delete_end);
// Loads a list of matching password forms into the specified vector |forms|.
// The list will contain all possibly relevant entries to the observed |form|,
diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc
index f6049cb..d4e0cf1 100644
--- a/chrome/browser/webdata/web_database_unittest.cc
+++ b/chrome/browser/webdata/web_database_unittest.cc
@@ -16,6 +16,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/glue/password_form.h"
+using base::Time;
+using base::TimeDelta;
+
class WebDatabaseTest : public testing::Test {
protected:
diff --git a/chrome/common/animation.cc b/chrome/common/animation.cc
index d407ccc..bf69812 100644
--- a/chrome/common/animation.cc
+++ b/chrome/common/animation.cc
@@ -5,6 +5,8 @@
#include "base/message_loop.h"
#include "chrome/common/animation.h"
+using base::TimeDelta;
+
Animation::Animation(int frame_rate,
AnimationDelegate* delegate)
: animating_(false),
diff --git a/chrome/common/chrome_plugin_lib.cc b/chrome/common/chrome_plugin_lib.cc
index ae8964d..642c623 100644
--- a/chrome/common/chrome_plugin_lib.cc
+++ b/chrome/common/chrome_plugin_lib.cc
@@ -18,6 +18,8 @@
#include "chrome/common/chrome_paths.h"
#include "webkit/glue/plugins/plugin_list.h"
+using base::TimeDelta;
+
const TCHAR ChromePluginLib::kRegistryChromePlugins[] =
_T("Software\\Google\\Chrome\\Plugins");
static const TCHAR kRegistryLoadOnStartup[] = _T("LoadOnStartup");
diff --git a/chrome/common/ipc_logging.cc b/chrome/common/ipc_logging.cc
index 8199f84..db8bf84 100644
--- a/chrome/common/ipc_logging.cc
+++ b/chrome/common/ipc_logging.cc
@@ -18,6 +18,8 @@
#ifdef IPC_MESSAGE_LOG_ENABLED
+using base::Time;
+
// IPC::Logging is allocated as a singleton, so we don't need any kind of
// special retention program.
template <>
@@ -267,4 +269,3 @@ void GenerateLogData(const std::wstring& channel, const Message& message,
}
#endif // IPC_MESSAGE_LOG_ENABLED
-
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h
index d5531e2..23a6f06 100644
--- a/chrome/common/ipc_message_utils.h
+++ b/chrome/common/ipc_message_utils.h
@@ -238,8 +238,8 @@ struct ParamTraits<wchar_t> {
};
template <>
-struct ParamTraits<Time> {
- typedef Time param_type;
+struct ParamTraits<base::Time> {
+ typedef base::Time param_type;
static void Write(Message* m, const param_type& p) {
ParamTraits<int64>::Write(m, p.ToInternalValue());
}
@@ -247,7 +247,7 @@ struct ParamTraits<Time> {
int64 value;
if (!ParamTraits<int64>::Read(m, iter, &value))
return false;
- *r = Time::FromInternalValue(value);
+ *r = base::Time::FromInternalValue(value);
return true;
}
static void Log(const param_type& p, std::wstring* l) {
@@ -636,16 +636,16 @@ struct ParamTraits<ThumbnailScore> {
IPC::ParamTraits<double>::Write(m, p.boring_score);
IPC::ParamTraits<bool>::Write(m, p.good_clipping);
IPC::ParamTraits<bool>::Write(m, p.at_top);
- IPC::ParamTraits<Time>::Write(m, p.time_at_snapshot);
+ IPC::ParamTraits<base::Time>::Write(m, p.time_at_snapshot);
}
static bool Read(const Message* m, void** iter, param_type* r) {
double boring_score;
bool good_clipping, at_top;
- Time time_at_snapshot;
+ base::Time time_at_snapshot;
if (!IPC::ParamTraits<double>::Read(m, iter, &boring_score) ||
!IPC::ParamTraits<bool>::Read(m, iter, &good_clipping) ||
!IPC::ParamTraits<bool>::Read(m, iter, &at_top) ||
- !IPC::ParamTraits<Time>::Read(m, iter, &time_at_snapshot))
+ !IPC::ParamTraits<base::Time>::Read(m, iter, &time_at_snapshot))
return false;
r->boring_score = boring_score;
diff --git a/chrome/common/ipc_sync_channel.cc b/chrome/common/ipc_sync_channel.cc
index 1f60def..0861790 100644
--- a/chrome/common/ipc_sync_channel.cc
+++ b/chrome/common/ipc_sync_channel.cc
@@ -13,6 +13,8 @@
#include "chrome/common/ipc_logging.h"
#include "chrome/common/ipc_sync_message.h"
+using base::TimeDelta;
+using base::TimeTicks;
namespace IPC {
// When we're blocked in a Send(), we need to process incoming synchronous
diff --git a/chrome/common/net/cookie_monster_sqlite.cc b/chrome/common/net/cookie_monster_sqlite.cc
index 5f0f361..f4026d0 100644
--- a/chrome/common/net/cookie_monster_sqlite.cc
+++ b/chrome/common/net/cookie_monster_sqlite.cc
@@ -14,6 +14,8 @@
#include "chrome/common/sqlite_compiled_statement.h"
#include "chrome/common/sqlite_utils.h"
+using base::Time;
+
// This class is designed to be shared between any calling threads and the
// database thread. It batches operations and commits them on a timer.
class SQLitePersistentCookieStore::Backend
@@ -354,4 +356,3 @@ void SQLitePersistentCookieStore::DeleteCookie(
if (backend_.get())
backend_->DeleteCookie(cc);
}
-
diff --git a/chrome/common/net/url_request_intercept_job.cc b/chrome/common/net/url_request_intercept_job.cc
index 1b18a68..398f2b0 100644
--- a/chrome/common/net/url_request_intercept_job.cc
+++ b/chrome/common/net/url_request_intercept_job.cc
@@ -13,6 +13,9 @@
#include "chrome/common/chrome_plugin_lib.h"
#include "net/base/net_errors.h"
+using base::Time;
+using base::TimeDelta;
+
//
// URLRequestInterceptJob
//
@@ -207,4 +210,3 @@ void URLRequestInterceptJob::Observe(NotificationType type,
DetachPlugin();
}
-
diff --git a/chrome/common/thumbnail_score.cc b/chrome/common/thumbnail_score.cc
index 5a7cf90..72c6239 100644
--- a/chrome/common/thumbnail_score.cc
+++ b/chrome/common/thumbnail_score.cc
@@ -6,6 +6,9 @@
#include "base/logging.h"
+using base::Time;
+using base::TimeDelta;
+
const TimeDelta ThumbnailScore::kUpdateThumbnailTime = TimeDelta::FromDays(1);
const double ThumbnailScore::kThumbnailMaximumBoringness = 0.94;
const double ThumbnailScore::kThumbnailDegradePerHour = 0.01;
diff --git a/chrome/common/thumbnail_score.h b/chrome/common/thumbnail_score.h
index f6f83a9..6990726 100644
--- a/chrome/common/thumbnail_score.h
+++ b/chrome/common/thumbnail_score.h
@@ -19,7 +19,7 @@ struct ThumbnailScore {
// Builds a ThumbnailScore with the passed in values.
ThumbnailScore(double score, bool clipping, bool top,
- const Time& time);
+ const base::Time& time);
~ThumbnailScore();
// Tests for equivalence between two ThumbnailScore objects.
@@ -46,7 +46,7 @@ struct ThumbnailScore {
// Record the time when a thumbnail was taken. This is used to make
// sure thumbnails are kept fresh.
- Time time_at_snapshot;
+ base::Time time_at_snapshot;
// How bad a thumbnail needs to be before we completely ignore it.
static const double kThumbnailMaximumBoringness;
@@ -54,7 +54,7 @@ struct ThumbnailScore {
// Time before we take a worse thumbnail (subject to
// kThumbnailMaximumBoringness) over what's currently in the database
// for freshness.
- static const TimeDelta kUpdateThumbnailTime;
+ static const base::TimeDelta kUpdateThumbnailTime;
// Penalty of how much more boring a thumbnail should be per hour.
static const double kThumbnailDegradePerHour;
diff --git a/chrome/common/time_format.cc b/chrome/common/time_format.cc
index 39412ea..029aec0 100644
--- a/chrome/common/time_format.cc
+++ b/chrome/common/time_format.cc
@@ -21,6 +21,9 @@
#include "unicode/plurrule.h"
#include "unicode/smpdtfmt.h"
+using base::Time;
+using base::TimeDelta;
+
class TimeRemainingFormat {
public:
const std::vector<PluralFormat*>& formatter(bool short_version) {
diff --git a/chrome/common/time_format.h b/chrome/common/time_format.h
index 8704e01..252599b 100644
--- a/chrome/common/time_format.h
+++ b/chrome/common/time_format.h
@@ -11,8 +11,10 @@
#include "unicode/smpdtfmt.h"
+namespace base {
class Time;
class TimeDelta;
+}
class TimeFormat {
public:
@@ -20,10 +22,10 @@ class TimeFormat {
// are simpler than PastTime since this is used for in-progress operations
// and users have different expectations of units.
// Ex: "3 mins left", "2 days left".
- static std::wstring TimeRemaining(const TimeDelta& delta);
+ static std::wstring TimeRemaining(const base::TimeDelta& delta);
// Same as TimeRemaining without the "left".
- static std::wstring TimeRemainingShort(const TimeDelta& delta);
+ static std::wstring TimeRemainingShort(const base::TimeDelta& delta);
// For displaying a relative time in the past. This method returns either
// "Today", "Yesterday", or an empty string if it's older than that.
@@ -38,9 +40,8 @@ class TimeFormat {
// If NULL, the current day's midnight will be retrieved, which can be
// slow. If many items are being processed, it is best to get the current
// time once at the beginning and pass it for each computation.
- static std::wstring RelativeDate(const Time& time,
- const Time* optional_midnight_today);
+ static std::wstring RelativeDate(const base::Time& time,
+ const base::Time* optional_midnight_today);
};
#endif // CHROME_COMMON_TIME_FORMAT_H__
-
diff --git a/chrome/common/time_format_unittest.cc b/chrome/common/time_format_unittest.cc
index bb910cc..07119d1 100644
--- a/chrome/common/time_format_unittest.cc
+++ b/chrome/common/time_format_unittest.cc
@@ -10,6 +10,9 @@
#include "chrome/common/time_format.h"
#include "testing/gtest/include/gtest/gtest.h"
+using base::Time;
+using base::TimeDelta;
+
TEST(TimeFormat, RelativeDate) {
Time now = Time::Now();
std::wstring today_str = TimeFormat::RelativeDate(now, NULL);
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index f6c19d7..734514b 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -61,6 +61,8 @@
#include "generated_resources.h"
+using base::TimeDelta;
+
//-----------------------------------------------------------------------------
// define to write the time necessary for thumbnail/DOM text retrieval,
diff --git a/chrome/test/automation/autocomplete_edit_proxy.cc b/chrome/test/automation/autocomplete_edit_proxy.cc
index 889f624..3758c74 100644
--- a/chrome/test/automation/autocomplete_edit_proxy.cc
+++ b/chrome/test/automation/autocomplete_edit_proxy.cc
@@ -10,6 +10,9 @@
#include "chrome/test/automation/automation_messages.h"
#include "chrome/test/automation/automation_proxy.h"
+using base::TimeDelta;
+using base::TimeTicks;
+
bool AutocompleteEditProxy::GetText(std::wstring* text) const {
if (!is_valid())
return false;
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 1724f95..5588ea8 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -16,6 +16,9 @@
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
+using base::TimeDelta;
+using base::TimeTicks;
+
// This class exists to group together the data and functionality used for
// synchronous automation requests.
class AutomationRequest :
@@ -556,4 +559,3 @@ TabProxy* AutomationProxy::CreateExternalTab(HWND* external_tab_container) {
delete response;
return tab_proxy;
}
-
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index 8a30c31..ce47335 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -13,6 +13,9 @@
#include "chrome/test/automation/automation_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
+using base::TimeDelta;
+using base::TimeTicks;
+
bool BrowserProxy::ActivateTab(int tab_index) {
return ActivateTabWithTimeout(tab_index, INFINITE, NULL);
}
diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc
index ce37879..59fdfa1 100644
--- a/chrome/test/startup/feature_startup_test.cc
+++ b/chrome/test/startup/feature_startup_test.cc
@@ -15,6 +15,8 @@
#include "chrome/test/ui/ui_test.h"
#include "net/base/net_util.h"
+using base::TimeDelta;
+
namespace {
// Returns the directory name where the "typical" user data is that we use for
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index 583dd58..34f91b9 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -10,6 +10,9 @@
#include "chrome/test/ui/ui_test.h"
#include "net/base/net_util.h"
+using base::TimeDelta;
+using base::TimeTicks;
+
namespace {
// Wrapper around CopyFile to retry 10 times if there is an error.
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index 8abb4ec..235c568 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/history/history_backend.h"
#include "chrome/common/chrome_constants.h"
+using base::Time;
+
namespace {
// BookmarkLoadObserver is used when blocking until the BookmarkModel
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h
index ea45bc1..9eff18d 100644
--- a/chrome/test/testing_profile.h
+++ b/chrome/test/testing_profile.h
@@ -136,7 +136,7 @@ class TestingProfile : public Profile {
virtual bool Profile::IsSameProfile(Profile *p) {
return this == p;
}
- virtual Time GetStartTime() const {
+ virtual base::Time GetStartTime() const {
return start_time_;
}
virtual TabRestoreService* GetTabRestoreService() {
@@ -162,7 +162,7 @@ class TestingProfile : public Profile {
// The path of the profile; the various database and other files are relative
// to this.
std::wstring path_;
- Time start_time_;
+ base::Time start_time_;
scoped_ptr<PrefService> prefs_;
private:
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index f0aec29..322f02c 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -30,6 +30,8 @@
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
+using base::TimeTicks;
+
bool UITest::in_process_renderer_ = false;
bool UITest::in_process_plugins_ = false;
bool UITest::no_sandbox_ = false;
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 8c67282..f575496 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -353,7 +353,7 @@ class UITest : public testing::Test {
std::wstring homepage_; // Homepage used for testing.
bool wait_for_initial_loads_; // Wait for initial loads to complete
// in SetUp() before running test body.
- TimeTicks browser_launch_time_; // Time when the browser was run.
+ base::TimeTicks browser_launch_time_; // Time when the browser was run.
bool dom_automation_enabled_; // This can be set to true to have the
// test run the dom automation case.
std::wstring template_user_data_; // See set_template_user_data().
diff --git a/chrome/tools/profiles/generate_profile.cc b/chrome/tools/profiles/generate_profile.cc
index 99098af..d60f3ae 100644
--- a/chrome/tools/profiles/generate_profile.cc
+++ b/chrome/tools/profiles/generate_profile.cc
@@ -19,6 +19,8 @@
#include "chrome/common/thumbnail_score.h"
#include "SkBitmap.h"
+using base::Time;
+
// Probabilities of different word lengths, as measured from Darin's profile.
// kWordLengthProbabilities[n-1] = P(word of length n)
const float kWordLengthProbabilities[] = { 0.069f, 0.132f, 0.199f,
@@ -216,4 +218,3 @@ int main(int argc, const char* argv[]) {
return 0;
}
-
diff --git a/chrome/views/chrome_menu.cc b/chrome/views/chrome_menu.cc
index 393afe0..b2870ee 100644
--- a/chrome/views/chrome_menu.cc
+++ b/chrome/views/chrome_menu.cc
@@ -28,6 +28,9 @@
#undef min
#undef max
+using base::Time;
+using base::TimeDelta;
+
// Margins between the top of the item and the label.
static const int kItemTopMargin = 3;
@@ -2720,4 +2723,3 @@ void MenuController::StopScrolling() {
}
} // namespace views
-
diff --git a/chrome/views/menu_button.cc b/chrome/views/menu_button.cc
index 412d8fa..e9205b1 100644
--- a/chrome/views/menu_button.cc
+++ b/chrome/views/menu_button.cc
@@ -21,6 +21,9 @@
#include "generated_resources.h"
+using base::Time;
+using base::TimeDelta;
+
namespace views {
// The amount of time, in milliseconds, we wait before allowing another mouse
diff --git a/chrome/views/menu_button.h b/chrome/views/menu_button.h
index de6f973..c43d6b6 100644
--- a/chrome/views/menu_button.h
+++ b/chrome/views/menu_button.h
@@ -81,7 +81,7 @@ class MenuButton : public TextButton {
// menu. There is no clean way to get the second click event because the
// menu is displayed using a modal loop and, unlike regular menus in Windows,
// the button is not part of the displayed menu.
- Time menu_closed_time_;
+ base::Time menu_closed_time_;
// The associated menu's resource identifier.
ViewMenuDelegate* menu_delegate_;
diff --git a/chrome/views/repeat_controller.cc b/chrome/views/repeat_controller.cc
index d6a9ac4..2d52783 100644
--- a/chrome/views/repeat_controller.cc
+++ b/chrome/views/repeat_controller.cc
@@ -4,6 +4,8 @@
#include "chrome/views/repeat_controller.h"
+using base::TimeDelta;
+
namespace views {
// The delay before the first and then subsequent repeats. Values taken from
diff --git a/chrome/views/throbber.cc b/chrome/views/throbber.cc
index 7a82277..ba8695c 100644
--- a/chrome/views/throbber.cc
+++ b/chrome/views/throbber.cc
@@ -10,6 +10,8 @@
#include "chrome/common/resource_bundle.h"
#include "skia/include/SkBitmap.h"
+using base::TimeDelta;
+
namespace views {
Throbber::Throbber(int frame_time_ms,