| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser_process_platform_part_aurawin.h" | 5 #include "chrome/browser/browser_process_platform_part_aurawin.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process/kill.h" |
| 10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h
" | 12 #include "chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h
" |
| 13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 | 14 |
| 15 BrowserProcessPlatformPart::BrowserProcessPlatformPart() { | 15 BrowserProcessPlatformPart::BrowserProcessPlatformPart() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { | 18 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { |
| 19 } | 19 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 metro_viewer_process_host_->GetViewerProcessId(); | 57 metro_viewer_process_host_->GetViewerProcessId(); |
| 58 if (viewer_id == base::kNullProcessId) | 58 if (viewer_id == base::kNullProcessId) |
| 59 return; | 59 return; |
| 60 // The viewer doesn't hold any state so it is fine to kill it before it | 60 // The viewer doesn't hold any state so it is fine to kill it before it |
| 61 // cleanly exits. This will trigger MetroViewerProcessHost::OnChannelError() | 61 // cleanly exits. This will trigger MetroViewerProcessHost::OnChannelError() |
| 62 // which will cleanup references to g_browser_process. | 62 // which will cleanup references to g_browser_process. |
| 63 bool success = base::KillProcessById(viewer_id, 0, true); | 63 bool success = base::KillProcessById(viewer_id, 0, true); |
| 64 DCHECK(success); | 64 DCHECK(success); |
| 65 } | 65 } |
| 66 } | 66 } |
| OLD | NEW |