| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/android/offline_pages/offline_page_info_handler.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_info_handler.h" |
| 6 | 6 |
| 7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "components/offline_pages/request_header/offline_page_header.h" | 8 #include "components/offline_pages/core/request_header/offline_page_header.h" |
| 9 #include "components/sessions/content/content_serialized_navigation_driver.h" | 9 #include "components/sessions/content/content_serialized_navigation_driver.h" |
| 10 #include "content/public/browser/navigation_entry.h" | 10 #include "content/public/browser/navigation_entry.h" |
| 11 | 11 |
| 12 namespace offline_pages { | 12 namespace offline_pages { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 const char kOfflinePageInfoKey[] = "offline"; | 15 const char kOfflinePageInfoKey[] = "offline"; |
| 16 } | 16 } |
| 17 | 17 |
| 18 // static | 18 // static |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 content::NavigationEntry* entry) { | 55 content::NavigationEntry* entry) { |
| 56 OfflinePageHeader header(info); | 56 OfflinePageHeader header(info); |
| 57 // Some sanity check. | 57 // Some sanity check. |
| 58 if (header.reason == OfflinePageHeader::Reason::NONE || | 58 if (header.reason == OfflinePageHeader::Reason::NONE || |
| 59 !header.need_to_persist) | 59 !header.need_to_persist) |
| 60 return; | 60 return; |
| 61 entry->AddExtraHeaders(header.GetCompleteHeaderString()); | 61 entry->AddExtraHeaders(header.GetCompleteHeaderString()); |
| 62 } | 62 } |
| 63 | 63 |
| 64 } // namespace offline_pages | 64 } // namespace offline_pages |
| OLD | NEW |