OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/web_view/navigation_entry.h" | 5 #include "components/web_view/navigation_entry.h" |
6 | 6 |
7 namespace web_view { | 7 namespace web_view { |
8 | 8 |
9 NavigationEntry::NavigationEntry(mojo::URLRequestPtr original_request) | 9 NavigationEntry::NavigationEntry(mojo::URLRequestPtr original_request) |
10 : url_request_(original_request.Pass()) {} | 10 : url_request_(original_request.Pass()) { |
| 11 if (url_request_.originating_time().is_null()) |
| 12 url_request_.set_originating_time(base::TimeTicks::Now()); |
| 13 } |
11 | 14 |
12 NavigationEntry::NavigationEntry(const GURL& raw_url) | 15 NavigationEntry::NavigationEntry(const GURL& raw_url) |
13 : url_request_(raw_url) {} | 16 : url_request_(raw_url) {} |
14 | 17 |
15 NavigationEntry::~NavigationEntry() {} | 18 NavigationEntry::~NavigationEntry() {} |
16 | 19 |
17 mojo::URLRequestPtr NavigationEntry::BuildURLRequest() const { | 20 mojo::URLRequestPtr NavigationEntry::BuildURLRequest( |
| 21 bool update_originating_time) { |
| 22 if (update_originating_time) |
| 23 url_request_.set_originating_time(base::TimeTicks::Now()); |
18 return url_request_.Clone(); | 24 return url_request_.Clone(); |
19 } | 25 } |
20 | 26 |
21 } // namespace web_view | 27 } // namespace web_view |
OLD | NEW |