| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/manifest/manifest_manager_host.h" | 5 #include "content/browser/manifest/manifest_manager_host.h" |
| 6 | 6 |
| 7 #include "content/common/manifest_manager_messages.h" | 7 #include "content/common/manifest_manager_messages.h" |
| 8 #include "content/public/browser/render_frame_host.h" | 8 #include "content/public/browser/render_frame_host.h" |
| 9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
| 10 #include "content/public/common/manifest.h" | 10 #include "content/public/common/manifest.h" |
| 11 #include "content/public/common/result_codes.h" | 11 #include "content/public/common/result_codes.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 void KillRenderer(RenderFrameHost* render_frame_host) { | 17 void KillRenderer(RenderFrameHost* render_frame_host) { |
| 18 base::ProcessHandle process_handle = | 18 base::ProcessHandle process_handle = |
| 19 render_frame_host->GetProcess()->GetHandle(); | 19 render_frame_host->GetProcess()->GetHandle(); |
| 20 if (process_handle == base::kNullProcessHandle) | 20 if (process_handle == base::kNullProcessHandle) |
| 21 return; | 21 return; |
| 22 base::KillProcess(process_handle, RESULT_CODE_KILLED_BAD_MESSAGE, false); | 22 render_frame_host->GetProcess()->Shutdown(RESULT_CODE_KILLED_BAD_MESSAGE, |
| 23 false); |
| 23 } | 24 } |
| 24 | 25 |
| 25 } // anonymous namespace | 26 } // anonymous namespace |
| 26 | 27 |
| 27 ManifestManagerHost::ManifestManagerHost(WebContents* web_contents) | 28 ManifestManagerHost::ManifestManagerHost(WebContents* web_contents) |
| 28 : WebContentsObserver(web_contents) { | 29 : WebContentsObserver(web_contents) { |
| 29 } | 30 } |
| 30 | 31 |
| 31 ManifestManagerHost::~ManifestManagerHost() { | 32 ManifestManagerHost::~ManifestManagerHost() { |
| 32 } | 33 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 130 |
| 130 callback->Run(manifest); | 131 callback->Run(manifest); |
| 131 callbacks->Remove(request_id); | 132 callbacks->Remove(request_id); |
| 132 if (callbacks->IsEmpty()) { | 133 if (callbacks->IsEmpty()) { |
| 133 delete callbacks; | 134 delete callbacks; |
| 134 pending_callbacks_.erase(render_frame_host); | 135 pending_callbacks_.erase(render_frame_host); |
| 135 } | 136 } |
| 136 } | 137 } |
| 137 | 138 |
| 138 } // namespace content | 139 } // namespace content |
| OLD | NEW |