Chromium Code Reviews| Index: components/web_view/navigation_entry.cc |
| diff --git a/components/web_view/navigation_entry.cc b/components/web_view/navigation_entry.cc |
| index 0b3aaa86fa0b2fa45f42b31e7861073a23ee88b6..a101ac2cdfddb4d43a248626605f59911b8a9bf7 100644 |
| --- a/components/web_view/navigation_entry.cc |
| +++ b/components/web_view/navigation_entry.cc |
| @@ -14,8 +14,17 @@ NavigationEntry::NavigationEntry(const GURL& raw_url) |
| NavigationEntry::~NavigationEntry() {} |
| -mojo::URLRequestPtr NavigationEntry::BuildURLRequest() const { |
| - return url_request_.Clone(); |
| +mojo::URLRequestPtr NavigationEntry::BuildURLRequest() { |
|
sky
2015/10/15 13:14:46
Instead of implying whether the time is reset base
yzshen1
2015/10/15 18:23:08
Done.
|
| + mojo::URLRequestPtr clone = url_request_.Clone(); |
| + if (clone->originating_time_ticks != 0) { |
| + // Forget the originating time, so that we will use Now() when this entry is |
| + // used for navigation again (e.g., back/forward navigation). |
| + url_request_.set_originating_time(base::TimeTicks()); |
| + } else { |
| + // Use Now() as the request originating time. |
| + clone->originating_time_ticks = base::TimeTicks::Now().ToInternalValue(); |
| + } |
| + return clone.Pass(); |
| } |
| } // namespace web_view |