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

Unified Diff: webkit/glue/webdatasource_impl.cc

Issue 42527: - Added support for keeping track of load times.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webdatasource_impl.h ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webdatasource_impl.cc
===================================================================
--- webkit/glue/webdatasource_impl.cc (revision 13095)
+++ webkit/glue/webdatasource_impl.cc (working copy)
@@ -5,18 +5,24 @@
#include "config.h"
#include "webkit/glue/webdatasource_impl.h"
+#include "FrameLoaderTypes.h"
+#include "FrameLoadRequest.h"
#include "KURL.h"
-#include "FrameLoadRequest.h"
#include "ResourceRequest.h"
#undef LOG
+#include "base/histogram.h"
#include "base/string_util.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/webdatasource_impl.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/weburlrequest_impl.h"
+#include "webkit/glue/webview_delegate.h"
+using base::TimeDelta;
+using base::Time;
+
// static
PassRefPtr<WebDataSourceImpl> WebDataSourceImpl::Create(
const WebCore::ResourceRequest& request,
@@ -99,3 +105,46 @@
string16 WebDataSourceImpl::GetPageTitle() const {
return webkit_glue::StringToString16(title());
}
+
+base::Time WebDataSourceImpl::GetRequestTime() const {
+ return request_time_;
+}
+
+void WebDataSourceImpl::SetRequestTime(base::Time time) {
+ request_time_ = time;
+}
+
+base::Time WebDataSourceImpl::GetStartLoadTime() const {
+ return start_load_time_;
+}
+
+base::Time WebDataSourceImpl::GetFinishDocumentLoadTime() const {
+ return finish_document_load_time_;
+}
+
+base::Time WebDataSourceImpl::GetFinishLoadTime() const {
+ return finish_load_time_;
+}
+
+WebNavigationType WebDataSourceImpl::GetNavigationType() const {
+ return NavigationTypeToWebNavigationType(triggeringAction().type());
+}
+
+WebNavigationType WebDataSourceImpl::NavigationTypeToWebNavigationType(
+ WebCore::NavigationType type) {
+ switch (type) {
+ case WebCore::NavigationTypeLinkClicked:
+ return WebNavigationTypeLinkClicked;
+ case WebCore::NavigationTypeFormSubmitted:
+ return WebNavigationTypeFormSubmitted;
+ case WebCore::NavigationTypeBackForward:
+ return WebNavigationTypeBackForward;
+ case WebCore::NavigationTypeReload:
+ return WebNavigationTypeReload;
+ case WebCore::NavigationTypeFormResubmitted:
+ return WebNavigationTypeFormResubmitted;
+ case WebCore::NavigationTypeOther:
+ default:
+ return WebNavigationTypeOther;
+ }
+}
« no previous file with comments | « webkit/glue/webdatasource_impl.h ('k') | webkit/glue/webframe_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698