summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_watcher
diff options
context:
space:
mode:
authorpmonette <pmonette@chromium.org>2016-01-07 16:21:16 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-08 00:22:31 +0000
commit502a83e013988cb8202844650e0e423ec2d8ee78 (patch)
treebec66a12ca8a6b9edd9a657431db9e1f94ba7adf /chrome/chrome_watcher
parentab0c1304c9f3b0c248f154680db5449f1a5497c8 (diff)
downloadchromium_src-502a83e013988cb8202844650e0e423ec2d8ee78.zip
chromium_src-502a83e013988cb8202844650e0e423ec2d8ee78.tar.gz
chromium_src-502a83e013988cb8202844650e0e423ec2d8ee78.tar.bz2
Switched Kasko to use the new buildflag system.
Moved gyp build to third_party/kasko Also fixed some build issues that came with rebasing to tip of tree. Review URL: https://codereview.chromium.org/1526213002 Cr-Commit-Position: refs/heads/master@{#368212}
Diffstat (limited to 'chrome/chrome_watcher')
-rw-r--r--chrome/chrome_watcher/DEPS1
-rw-r--r--chrome/chrome_watcher/chrome_watcher.gypi8
-rw-r--r--chrome/chrome_watcher/chrome_watcher_main.cc19
3 files changed, 12 insertions, 16 deletions
diff --git a/chrome/chrome_watcher/DEPS b/chrome/chrome_watcher/DEPS
index d7f5402..7bc4be6 100644
--- a/chrome/chrome_watcher/DEPS
+++ b/chrome/chrome_watcher/DEPS
@@ -3,4 +3,5 @@ include_rules = [
"+chrome/installer/util",
"+components/browser_watcher",
"+syzygy/kasko/api",
+ "+third_party/kasko",
]
diff --git a/chrome/chrome_watcher/chrome_watcher.gypi b/chrome/chrome_watcher/chrome_watcher.gypi
index 9836501..f676a26 100644
--- a/chrome/chrome_watcher/chrome_watcher.gypi
+++ b/chrome/chrome_watcher/chrome_watcher.gypi
@@ -64,13 +64,7 @@
'installer_util',
'../base/base.gyp:base',
'../components/components.gyp:browser_watcher',
- ],
- 'conditions': [
- ['kasko==1', {
- 'dependencies': [
- 'kasko_dll',
- ],
- }],
+ '../third_party/kasko/kasko.gyp:kasko',
],
'msvs_settings': {
'VCLinkerTool': {
diff --git a/chrome/chrome_watcher/chrome_watcher_main.cc b/chrome/chrome_watcher/chrome_watcher_main.cc
index 01e916b..e28de01 100644
--- a/chrome/chrome_watcher/chrome_watcher_main.cc
+++ b/chrome/chrome_watcher/chrome_watcher_main.cc
@@ -37,8 +37,9 @@
#include "components/browser_watcher/endsession_watcher_window_win.h"
#include "components/browser_watcher/exit_code_watcher_win.h"
#include "components/browser_watcher/window_hang_monitor_win.h"
+#include "third_party/kasko/kasko_features.h"
-#ifdef KASKO
+#if BUILDFLAG(ENABLE_KASKO)
#include "syzygy/kasko/api/reporter.h"
#endif
@@ -194,7 +195,7 @@ void OnWindowEvent(
}
}
-#ifdef KASKO
+#if BUILDFLAG(ENABLE_KASKO)
// Helper function for determining the crash server to use. Defaults to the
// standard crash server, but can be overridden via an environment variable.
// Enables easy integration testing.
@@ -342,7 +343,7 @@ void OnCrashReportUpload(void* context,
// TODO(erikwright): Copy minidump to some "last dump" location?
}
-#endif // KASKO
+#endif // BUILDFLAG(ENABLE_KASKO)
} // namespace
@@ -371,7 +372,7 @@ extern "C" int WatcherMain(const base::char16* registry_path,
base::Callback<void(const base::Process&)> on_hung_callback;
-#ifdef KASKO
+#if BUILDFLAG(ENABLE_KASKO)
base::string16 crash_server;
GetKaskoCrashServerUrl(&crash_server);
@@ -389,14 +390,14 @@ extern "C" int WatcherMain(const base::char16* registry_path,
.value()
.c_str(),
&OnCrashReportUpload, nullptr);
-#ifdef KASKO_HANG_REPORTS
+#if BUILDFLAG(ENABLE_KASKO_HANG_REPORTS)
if (launched_kasko &&
base::StringPiece16(channel_name) == installer::kChromeChannelCanary) {
on_hung_callback =
base::Bind(&DumpHungBrowserProcess, main_thread_id, channel_name);
}
-#endif // KASKO_HANG_REPORTS
-#endif // KASKO
+#endif // BUILDFLAG(ENABLE_KASKO_HANG_REPORTS)
+#endif // BUILDFLAG(ENABLE_KASKO)
// Run a UI message loop on the main thread.
base::MessageLoop msg_loop(base::MessageLoop::TYPE_UI);
@@ -420,10 +421,10 @@ extern "C" int WatcherMain(const base::char16* registry_path,
run_loop.Run();
}
-#ifdef KASKO
+#if BUILDFLAG(ENABLE_KASKO)
if (launched_kasko)
kasko::api::ShutdownReporter();
-#endif // KASKO
+#endif // BUILDFLAG(ENABLE_KASKO)
// Wind logging down.
logging::LogEventProvider::Uninitialize();