Index: chrome/browser/predictors/resource_prefetch_common.h |
diff --git a/chrome/browser/predictors/resource_prefetch_common.h b/chrome/browser/predictors/resource_prefetch_common.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..38924d90d4f685b93c1beb3e19b5dbc76b0d3a03 |
--- /dev/null |
+++ b/chrome/browser/predictors/resource_prefetch_common.h |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_ |
+#define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_ |
+#pragma once |
+ |
+#include "base/time.h" |
+#include "googleurl/src/gurl.h" |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace predictors { |
+ |
+// Represents a single navigation for a render view. |
+struct NavigationID { |
dominich
2012/05/21 16:16:53
This should be a class (it has constructors, opera
Shishir
2012/05/23 01:46:46
I don't think it is significant enough to warrant
|
+ NavigationID(); |
+ NavigationID(const NavigationID& other); |
dominich
2012/05/21 16:16:53
Try explicit here - I don't know if STL is using d
Shishir
2012/05/23 01:46:46
STL doenst like it.
|
+ NavigationID(const content::WebContents& web_contents); |
dominich
2012/05/21 16:16:53
This should be explicit as you call it directly.
Shishir
2012/05/23 01:46:46
Done.
|
+ bool operator<(const NavigationID& rhs) const; |
+ bool operator==(const NavigationID& rhs) const; |
+ |
+ bool IsSameRenderer(const NavigationID& other) const; |
+ |
+ int render_process_id_; |
dominich
2012/05/21 16:16:53
Do these all need to be public?
Shishir
2012/05/23 01:46:46
Unless we want to expose each member through funct
|
+ int render_view_id_; |
+ GURL main_frame_url_; |
+ |
+ // NOTE: Even though we store the time ticks here, it is not used during |
+ // comparison of two NavigationIDs because it cannot always be determined |
+ // correctly. |
+ base::TimeTicks creation_time_; |
+}; |
+ |
+} // namespace predictors |
+ |
+#endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_COMMON_H_ |