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

Unified Diff: chrome/chrome_watcher/chrome_watcher_main.cc

Issue 1630923002: Remove PRODUCT_STRING_PATH from chrome_constants.h on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@c2_rm_PSP_profile_resetter
Patch Set: rebase on r373339 and rm unused install_util.h include Created 4 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
Index: chrome/chrome_watcher/chrome_watcher_main.cc
diff --git a/chrome/chrome_watcher/chrome_watcher_main.cc b/chrome/chrome_watcher/chrome_watcher_main.cc
index 14765fb175e5a9c77e122ebadef9dc4b54ea7345..439f78737844c16f3b433c1cf931c6e0da89ddfc 100644
--- a/chrome/chrome_watcher/chrome_watcher_main.cc
+++ b/chrome/chrome_watcher/chrome_watcher_main.cc
@@ -60,14 +60,13 @@ const int kDelayTimeSeconds = 30;
// an exit funnel, for reporting the next time Chrome runs.
class BrowserMonitor {
public:
- BrowserMonitor(base::RunLoop* run_loop, const base::char16* registry_path);
+ BrowserMonitor(base::StringPiece16 registry_path, base::RunLoop* run_loop);
~BrowserMonitor();
// Initiates the asynchronous monitoring process, returns true on success.
// |on_initialized_event| will be signaled immediately before blocking on the
// exit of |process|.
- bool StartWatching(const base::char16* registry_path,
- base::Process process,
+ bool StartWatching(base::Process process,
base::win::ScopedHandle on_initialized_event);
private:
@@ -98,8 +97,8 @@ class BrowserMonitor {
DISALLOW_COPY_AND_ASSIGN(BrowserMonitor);
};
-BrowserMonitor::BrowserMonitor(base::RunLoop* run_loop,
- const base::char16* registry_path)
+BrowserMonitor::BrowserMonitor(base::StringPiece16 registry_path,
+ base::RunLoop* run_loop)
: exit_code_watcher_(registry_path),
end_session_watcher_window_(
base::Bind(&BrowserMonitor::OnEndSessionMessage,
@@ -114,7 +113,6 @@ BrowserMonitor::~BrowserMonitor() {
}
bool BrowserMonitor::StartWatching(
- const base::char16* registry_path,
base::Process process,
base::win::ScopedHandle on_initialized_event) {
if (!exit_code_watcher_.Initialize(process.Pass()))
@@ -186,7 +184,6 @@ void BrowserMonitor::BrowserExited() {
}
void OnWindowEvent(
- const base::string16& registry_path,
base::Process process,
const base::Callback<void(const base::Process&)>& on_hung_callback,
browser_watcher::WindowHangMonitor::WindowEvent window_event) {
@@ -385,8 +382,8 @@ extern "C" int WatcherMain(const base::char16* registry_path,
msg_loop.set_thread_name("WatcherMainThread");
base::RunLoop run_loop;
- BrowserMonitor monitor(&run_loop, registry_path);
- if (!monitor.StartWatching(registry_path, process.Duplicate(),
+ BrowserMonitor monitor(registry_path, &run_loop);
+ if (!monitor.StartWatching(process.Duplicate(),
on_initialized_event.Pass())) {
return 1;
}
@@ -395,8 +392,8 @@ extern "C" int WatcherMain(const base::char16* registry_path,
// Scoped to force |hang_monitor| destruction before Kasko is shut down.
browser_watcher::WindowHangMonitor hang_monitor(
base::TimeDelta::FromSeconds(60), base::TimeDelta::FromSeconds(20),
- base::Bind(&OnWindowEvent, registry_path,
- base::Passed(process.Duplicate()), on_hung_callback));
+ base::Bind(&OnWindowEvent, base::Passed(process.Duplicate()),
+ on_hung_callback));
hang_monitor.Initialize(process.Duplicate());
run_loop.Run();

Powered by Google App Engine
This is Rietveld 408576698