diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 16:43:16 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-12 16:43:16 +0000 |
commit | f691f0e726229cf1150d2f04310d0d41be36f98c (patch) | |
tree | 512110bad2f6e26d183299e9b7234537d22cc970 /chrome/browser | |
parent | 62b113d13973e00c55107f308e92463bae007bb2 (diff) | |
download | chromium_src-f691f0e726229cf1150d2f04310d0d41be36f98c.zip chromium_src-f691f0e726229cf1150d2f04310d0d41be36f98c.tar.gz chromium_src-f691f0e726229cf1150d2f04310d0d41be36f98c.tar.bz2 |
Second round of transition of Time to TimeTicks for histogramming
The first CL was getting too large, and was being held back by
some platform specific changes. I pulled out the problems into
this CL to make it easier ot focus on getting them all right.
BUG=14193
r=eroman
Review URL: http://codereview.chromium.org/2033005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
6 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/external_protocol_dialog.cc b/chrome/browser/chromeos/external_protocol_dialog.cc index 860f62d..5aeb8a9 100644 --- a/chrome/browser/chromeos/external_protocol_dialog.cc +++ b/chrome/browser/chromeos/external_protocol_dialog.cc @@ -81,7 +81,7 @@ views::View* ExternalProtocolDialog::GetContentsView() { ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents, const GURL& url) - : creation_time_(base::Time::Now()), + : creation_time_(base::TimeTicks::Now()), scheme_(UTF8ToWide(url.scheme())) { const int kMaxUrlWithoutSchemeSize = 256; std::wstring elided_url_without_scheme; diff --git a/chrome/browser/chromeos/external_protocol_dialog.h b/chrome/browser/chromeos/external_protocol_dialog.h index 9631004..71ca656 100644 --- a/chrome/browser/chromeos/external_protocol_dialog.h +++ b/chrome/browser/chromeos/external_protocol_dialog.h @@ -40,7 +40,7 @@ class ExternalProtocolDialog : public views::DialogDelegate { MessageBoxView* message_box_view_; // The time at which this dialog was created. - base::Time creation_time_; + base::TimeTicks creation_time_; // The scheme of the url. std::wstring scheme_; diff --git a/chrome/browser/gtk/external_protocol_dialog_gtk.cc b/chrome/browser/gtk/external_protocol_dialog_gtk.cc index 3222f97..2530d5b 100644 --- a/chrome/browser/gtk/external_protocol_dialog_gtk.cc +++ b/chrome/browser/gtk/external_protocol_dialog_gtk.cc @@ -41,7 +41,7 @@ void ExternalProtocolHandler::RunExternalProtocolDialog( ExternalProtocolDialogGtk::ExternalProtocolDialogGtk(const GURL& url) : url_(url), - creation_time_(base::Time::Now()) { + creation_time_(base::TimeTicks::Now()) { DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); dialog_ = gtk_dialog_new_with_buttons( @@ -124,7 +124,7 @@ void ExternalProtocolDialogGtk::OnDialogResponse(GtkWidget* widget, if (response == GTK_RESPONSE_ACCEPT) { UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url", - base::Time::Now() - creation_time_); + base::TimeTicks::Now() - creation_time_); ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url_); } diff --git a/chrome/browser/gtk/external_protocol_dialog_gtk.h b/chrome/browser/gtk/external_protocol_dialog_gtk.h index c77b284..9c2e6dd 100644 --- a/chrome/browser/gtk/external_protocol_dialog_gtk.h +++ b/chrome/browser/gtk/external_protocol_dialog_gtk.h @@ -23,7 +23,7 @@ class ExternalProtocolDialogGtk { GtkWidget* dialog_; GtkWidget* checkbox_; GURL url_; - base::Time creation_time_; + base::TimeTicks creation_time_; }; #endif // CHROME_BROWSER_GTK_EXTERNAL_PROTOCOL_DIALOG_GTK_H_ diff --git a/chrome/browser/views/external_protocol_dialog.cc b/chrome/browser/views/external_protocol_dialog.cc index 32126ee..afaba70 100644 --- a/chrome/browser/views/external_protocol_dialog.cc +++ b/chrome/browser/views/external_protocol_dialog.cc @@ -93,7 +93,7 @@ bool ExternalProtocolDialog::Accept() { // users start accepting these dialogs too quickly, we should worry about // clickjacking. UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url", - base::Time::Now() - creation_time_); + base::TimeTicks::Now() - creation_time_); if (message_box_view_->IsCheckBoxSelected()) { ExternalProtocolHandler::SetBlockState( @@ -117,7 +117,7 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents, const std::wstring& command) : tab_contents_(tab_contents), url_(url), - creation_time_(base::Time::Now()) { + creation_time_(base::TimeTicks::Now()) { const int kMaxUrlWithoutSchemeSize = 256; const int kMaxCommandSize = 256; std::wstring elided_url_without_scheme; diff --git a/chrome/browser/views/external_protocol_dialog.h b/chrome/browser/views/external_protocol_dialog.h index 4a5e469..b32582f 100644 --- a/chrome/browser/views/external_protocol_dialog.h +++ b/chrome/browser/views/external_protocol_dialog.h @@ -50,7 +50,7 @@ class ExternalProtocolDialog : public views::DialogDelegate { GURL url_; // The time at which this dialog was created. - base::Time creation_time_; + base::TimeTicks creation_time_; DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog); }; |