| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/download/mhtml_generation_manager.h" | 5 #include "content/browser/download/mhtml_generation_manager.h" |
| 6 | 6 |
| 7 #include "base/platform_file.h" | 7 #include "base/platform_file.h" |
| 8 #include "content/browser/renderer_host/render_process_host.h" | 8 #include "content/browser/renderer_host/render_process_host.h" |
| 9 #include "content/browser/renderer_host/render_view_host.h" | 9 #include "content/browser/renderer_host/render_view_host.h" |
| 10 #include "content/browser/tab_contents/tab_contents.h" | 10 #include "content/browser/tab_contents/tab_contents.h" |
| 11 #include "content/common/content_notification_types.h" | 11 #include "content/common/content_notification_types.h" |
| 12 #include "content/common/notification_service.h" | 12 #include "content/common/notification_service.h" |
| 13 #include "content/common/page_transition_types.h" | |
| 14 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
| 15 | 14 |
| 16 MHTMLGenerationManager::Job::Job() | 15 MHTMLGenerationManager::Job::Job() |
| 17 : browser_file(base::kInvalidPlatformFileValue), | 16 : browser_file(base::kInvalidPlatformFileValue), |
| 18 renderer_file(IPC::InvalidPlatformFileForTransit()), | 17 renderer_file(IPC::InvalidPlatformFileForTransit()), |
| 19 process_id(-1), | 18 process_id(-1), |
| 20 routing_id(-1) { | 19 routing_id(-1) { |
| 21 } | 20 } |
| 22 | 21 |
| 23 MHTMLGenerationManager::MHTMLGenerationManager() { | 22 MHTMLGenerationManager::MHTMLGenerationManager() { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 NewRunnableMethod(this, &MHTMLGenerationManager::CloseFile, | 123 NewRunnableMethod(this, &MHTMLGenerationManager::CloseFile, |
| 125 job.browser_file)); | 124 job.browser_file)); |
| 126 | 125 |
| 127 id_to_job_.erase(job_id); | 126 id_to_job_.erase(job_id); |
| 128 } | 127 } |
| 129 | 128 |
| 130 void MHTMLGenerationManager::CloseFile(base::PlatformFile file) { | 129 void MHTMLGenerationManager::CloseFile(base::PlatformFile file) { |
| 131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 130 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 132 base::ClosePlatformFile(file); | 131 base::ClosePlatformFile(file); |
| 133 } | 132 } |
| OLD | NEW |