| 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 "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" | 5 #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
| 18 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 18 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
| 19 #include "components/security_state/security_state_model.h" | 19 #include "components/security_state/core/security_state_model.h" |
| 20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "content/public/common/mhtml_generation_params.h" | 22 #include "content/public/common/mhtml_generation_params.h" |
| 23 #include "net/base/filename_util.h" | 23 #include "net/base/filename_util.h" |
| 24 | 24 |
| 25 namespace offline_pages { | 25 namespace offline_pages { |
| 26 namespace { | 26 namespace { |
| 27 const base::FilePath::CharType kMHTMLExtension[] = FILE_PATH_LITERAL("mhtml"); | 27 const base::FilePath::CharType kMHTMLExtension[] = FILE_PATH_LITERAL("mhtml"); |
| 28 const base::FilePath::CharType kDefaultFileName[] = | 28 const base::FilePath::CharType kDefaultFileName[] = |
| 29 FILE_PATH_LITERAL("offline_page"); | 29 FILE_PATH_LITERAL("offline_page"); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 | 172 |
| 173 void OfflinePageMHTMLArchiver::ReportFailure(ArchiverResult result) { | 173 void OfflinePageMHTMLArchiver::ReportFailure(ArchiverResult result) { |
| 174 DCHECK(result != ArchiverResult::SUCCESSFULLY_CREATED); | 174 DCHECK(result != ArchiverResult::SUCCESSFULLY_CREATED); |
| 175 base::ThreadTaskRunnerHandle::Get()->PostTask( | 175 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 176 FROM_HERE, base::Bind(callback_, this, result, GURL(), base::FilePath(), | 176 FROM_HERE, base::Bind(callback_, this, result, GURL(), base::FilePath(), |
| 177 base::string16(), 0)); | 177 base::string16(), 0)); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace offline_pages | 180 } // namespace offline_pages |
| OLD | NEW |