| 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 "content/browser/download/mhtml_generation_manager.h" | 5 #include "content/browser/download/mhtml_generation_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 int exit_code) { | 78 int exit_code) { |
| 79 MHTMLGenerationManager::GetInstance()->RenderProcessExited(this); | 79 MHTMLGenerationManager::GetInstance()->RenderProcessExited(this); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void MHTMLGenerationManager::Job::RenderProcessHostDestroyed( | 82 void MHTMLGenerationManager::Job::RenderProcessHostDestroyed( |
| 83 RenderProcessHost* host) { | 83 RenderProcessHost* host) { |
| 84 host_ = NULL; | 84 host_ = NULL; |
| 85 } | 85 } |
| 86 | 86 |
| 87 MHTMLGenerationManager* MHTMLGenerationManager::GetInstance() { | 87 MHTMLGenerationManager* MHTMLGenerationManager::GetInstance() { |
| 88 return Singleton<MHTMLGenerationManager>::get(); | 88 return base::Singleton<MHTMLGenerationManager>::get(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 MHTMLGenerationManager::MHTMLGenerationManager() { | 91 MHTMLGenerationManager::MHTMLGenerationManager() { |
| 92 } | 92 } |
| 93 | 93 |
| 94 MHTMLGenerationManager::~MHTMLGenerationManager() { | 94 MHTMLGenerationManager::~MHTMLGenerationManager() { |
| 95 STLDeleteValues(&id_to_job_); | 95 STLDeleteValues(&id_to_job_); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void MHTMLGenerationManager::SaveMHTML(WebContents* web_contents, | 98 void MHTMLGenerationManager::SaveMHTML(WebContents* web_contents, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 ++it) { | 229 ++it) { |
| 230 if (it->second == job) { | 230 if (it->second == job) { |
| 231 JobFinished(it->first, -1); | 231 JobFinished(it->first, -1); |
| 232 return; | 232 return; |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 NOTREACHED(); | 235 NOTREACHED(); |
| 236 } | 236 } |
| 237 | 237 |
| 238 } // namespace content | 238 } // namespace content |
| OLD | NEW |