OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "android_webview/native/state_serializer.h" | 5 #include "android_webview/native/state_serializer.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 const content::Referrer& referrer = entry.GetReferrer(); | 140 const content::Referrer& referrer = entry.GetReferrer(); |
141 if (!pickle->WriteString(referrer.url.spec())) | 141 if (!pickle->WriteString(referrer.url.spec())) |
142 return false; | 142 return false; |
143 if (!pickle->WriteInt(static_cast<int>(referrer.policy))) | 143 if (!pickle->WriteInt(static_cast<int>(referrer.policy))) |
144 return false; | 144 return false; |
145 | 145 |
146 if (!pickle->WriteString16(entry.GetTitle())) | 146 if (!pickle->WriteString16(entry.GetTitle())) |
147 return false; | 147 return false; |
148 | 148 |
| 149 if (!pickle->WriteString16(entry.GetSearchTerms())) |
| 150 return false; |
| 151 |
149 if (!pickle->WriteString(entry.GetContentState())) | 152 if (!pickle->WriteString(entry.GetContentState())) |
150 return false; | 153 return false; |
151 | 154 |
152 if (!pickle->WriteBool(static_cast<int>(entry.GetHasPostData()))) | 155 if (!pickle->WriteBool(static_cast<int>(entry.GetHasPostData()))) |
153 return false; | 156 return false; |
154 | 157 |
155 if (!pickle->WriteString(entry.GetOriginalRequestURL().spec())) | 158 if (!pickle->WriteString(entry.GetOriginalRequestURL().spec())) |
156 return false; | 159 return false; |
157 | 160 |
158 if (!pickle->WriteString(entry.GetBaseURLForDataURL().spec())) | 161 if (!pickle->WriteString(entry.GetBaseURLForDataURL().spec())) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 entry->SetIsOverridingUserAgent(is_overriding_user_agent); | 245 entry->SetIsOverridingUserAgent(is_overriding_user_agent); |
243 } | 246 } |
244 | 247 |
245 { | 248 { |
246 int64 timestamp; | 249 int64 timestamp; |
247 if (!iterator->ReadInt64(×tamp)) | 250 if (!iterator->ReadInt64(×tamp)) |
248 return false; | 251 return false; |
249 entry->SetTimestamp(base::Time::FromInternalValue(timestamp)); | 252 entry->SetTimestamp(base::Time::FromInternalValue(timestamp)); |
250 } | 253 } |
251 | 254 |
| 255 { |
| 256 string16 search_terms; |
| 257 if (!iterator->ReadString16(&search_terms)) { |
| 258 search_terms = string16(); |
| 259 } |
| 260 |
252 return true; | 261 return true; |
253 } | 262 } |
254 | 263 |
255 } // namespace internal | 264 } // namespace internal |
256 | 265 |
257 } // namespace android_webview | 266 } // namespace android_webview |
OLD | NEW |