OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/sessions/content/content_serialized_navigation_builder.h" | 5 #include "components/sessions/content/content_serialized_navigation_builder.h" |
6 | 6 |
7 #include "components/sessions/serialized_navigation_entry.h" | 7 #include "components/sessions/serialized_navigation_entry.h" |
8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
9 #include "content/public/browser/favicon_status.h" | 9 #include "content/public/browser/favicon_status.h" |
10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 navigation.virtual_url_ = entry.GetVirtualURL(); | 27 navigation.virtual_url_ = entry.GetVirtualURL(); |
28 navigation.title_ = entry.GetTitle(); | 28 navigation.title_ = entry.GetTitle(); |
29 navigation.encoded_page_state_ = entry.GetPageState().ToEncodedData(); | 29 navigation.encoded_page_state_ = entry.GetPageState().ToEncodedData(); |
30 navigation.transition_type_ = entry.GetTransitionType(); | 30 navigation.transition_type_ = entry.GetTransitionType(); |
31 navigation.has_post_data_ = entry.GetHasPostData(); | 31 navigation.has_post_data_ = entry.GetHasPostData(); |
32 navigation.post_id_ = entry.GetPostID(); | 32 navigation.post_id_ = entry.GetPostID(); |
33 navigation.original_request_url_ = entry.GetOriginalRequestURL(); | 33 navigation.original_request_url_ = entry.GetOriginalRequestURL(); |
34 navigation.is_overriding_user_agent_ = entry.GetIsOverridingUserAgent(); | 34 navigation.is_overriding_user_agent_ = entry.GetIsOverridingUserAgent(); |
35 navigation.timestamp_ = entry.GetTimestamp(); | 35 navigation.timestamp_ = entry.GetTimestamp(); |
36 navigation.is_restored_ = entry.IsRestored(); | 36 navigation.is_restored_ = entry.IsRestored(); |
37 // If you want to navigate a named frame in Chrome, you will first need to | |
38 // add support for persisting it. It is currently only used for layout tests. | |
39 CHECK(entry.GetFrameToNavigate().empty()); | |
40 entry.GetExtraData(kSearchTermsKey, &navigation.search_terms_); | 37 entry.GetExtraData(kSearchTermsKey, &navigation.search_terms_); |
41 if (entry.GetFavicon().valid) | 38 if (entry.GetFavicon().valid) |
42 navigation.favicon_url_ = entry.GetFavicon().url; | 39 navigation.favicon_url_ = entry.GetFavicon().url; |
43 navigation.http_status_code_ = entry.GetHttpStatusCode(); | 40 navigation.http_status_code_ = entry.GetHttpStatusCode(); |
44 navigation.redirect_chain_ = entry.GetRedirectChain(); | 41 navigation.redirect_chain_ = entry.GetRedirectChain(); |
45 | 42 |
46 return navigation; | 43 return navigation; |
47 } | 44 } |
48 | 45 |
49 // static | 46 // static |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 for (std::vector<SerializedNavigationEntry>::const_iterator | 94 for (std::vector<SerializedNavigationEntry>::const_iterator |
98 it = navigations.begin(); it != navigations.end(); ++it) { | 95 it = navigations.begin(); it != navigations.end(); ++it) { |
99 entries.push_back( | 96 entries.push_back( |
100 ToNavigationEntry(&(*it), page_id, browser_context).release()); | 97 ToNavigationEntry(&(*it), page_id, browser_context).release()); |
101 ++page_id; | 98 ++page_id; |
102 } | 99 } |
103 return entries.Pass(); | 100 return entries.Pass(); |
104 } | 101 } |
105 | 102 |
106 } // namespace sessions | 103 } // namespace sessions |
OLD | NEW |