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/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 16 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
17 #include "components/security_state/security_state_model.h" | 17 #include "components/security_state/security_state_model.h" |
18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
19 #include "net/base/filename_util.h" | 19 #include "net/base/filename_util.h" |
20 | 20 |
21 namespace offline_pages { | 21 namespace offline_pages { |
22 namespace { | 22 namespace { |
23 const base::FilePath::CharType kMHTMLExtension[] = FILE_PATH_LITERAL("mhtml"); | 23 const base::FilePath::CharType kMHTMLExtension[] = FILE_PATH_LITERAL("mhtml"); |
24 const base::FilePath::CharType kDefaultFileName[] = | 24 const base::FilePath::CharType kDefaultFileName[] = |
25 FILE_PATH_LITERAL("offline_page"); | 25 FILE_PATH_LITERAL("offline_page"); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 void OfflinePageMHTMLArchiver::ReportFailure(ArchiverResult result) { | 151 void OfflinePageMHTMLArchiver::ReportFailure(ArchiverResult result) { |
152 DCHECK(result != ArchiverResult::SUCCESSFULLY_CREATED); | 152 DCHECK(result != ArchiverResult::SUCCESSFULLY_CREATED); |
153 base::ThreadTaskRunnerHandle::Get()->PostTask( | 153 base::ThreadTaskRunnerHandle::Get()->PostTask( |
154 FROM_HERE, | 154 FROM_HERE, |
155 base::Bind(callback_, this, result, GURL(), base::FilePath(), 0)); | 155 base::Bind(callback_, this, result, GURL(), base::FilePath(), 0)); |
156 } | 156 } |
157 | 157 |
158 } // namespace offline_pages | 158 } // namespace offline_pages |
OLD | NEW |