Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: chrome/browser/chrome_process_finder_win.cc

Issue 860453002: Move OpenProcessHandleWithAccess to Process::OpenWithAccess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ServiceProcessControlBrowserTest.Setup again Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_win.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_process_finder_win.cc
diff --git a/chrome/browser/chrome_process_finder_win.cc b/chrome/browser/chrome_process_finder_win.cc
index 52efec5c464e1765650e7f8f11d713e9ed4326a2..0fe88448bf3ee569a5c537c083d398d2e500d7d5 100644
--- a/chrome/browser/chrome_process_finder_win.cc
+++ b/chrome/browser/chrome_process_finder_win.cc
@@ -11,7 +11,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
-#include "base/process/process_handle.h"
+#include "base/process/process.h"
#include "base/process/process_info.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -112,45 +112,6 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
if (!thread_id || !process_id)
return NOTIFY_FAILED;
-#if !defined(USE_AURA)
- if (base::win::IsMetroProcess()) {
- // Interesting corner case. We are launched as a metro process but we
- // found another chrome running. Since metro enforces single instance then
- // the other chrome must be desktop chrome and this must be a search charm
- // activation. This scenario is unique; other cases should be properly
- // handled by the delegate_execute which will not activate a second chrome.
- base::string16 terms;
- base::win::MetroLaunchType launch = base::win::GetMetroLaunchParams(&terms);
- if (launch != base::win::METRO_SEARCH) {
- LOG(WARNING) << "In metro mode, but and launch is " << launch;
- } else {
- std::string query = EscapeQueryParamValue(base::UTF16ToUTF8(terms), true);
- std::string url = base::StringPrintf(kSearchUrl, query.c_str());
- SHELLEXECUTEINFOA sei = { sizeof(sei) };
- sei.fMask = SEE_MASK_FLAG_LOG_USAGE;
- sei.nShow = SW_SHOWNORMAL;
- sei.lpFile = url.c_str();
- OutputDebugStringA(sei.lpFile);
- sei.lpDirectory = "";
- ::ShellExecuteExA(&sei);
- }
- return NOTIFY_SUCCESS;
- }
-
- base::win::ScopedHandle process_handle;
- if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
- base::OpenProcessHandleWithAccess(
- process_id, PROCESS_QUERY_INFORMATION,
- process_handle.Receive())) {
- // Receive() causes the process handle to be set in the destructor of the
- // temporary receiver object, which does not happen until after the if
- // statement is complete. So IsProcessImmersive() should only be checked
- // as part of a separate if statement.
- if (base::win::IsProcessImmersive(process_handle.Get()))
- chrome::ActivateMetroChrome();
- }
-#endif
Nico 2015/07/26 02:54:08 Did you delete this block intentionally? It looks
-
base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
command_line.AppendSwitchASCII(
switches::kOriginalProcessStartTime,
« no previous file with comments | « base/process/process_win.cc ('k') | chrome/browser/plugins/plugin_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698