summaryrefslogtreecommitdiffstats
path: root/ui/views/examples
diff options
context:
space:
mode:
authorasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-27 22:21:40 +0000
committerasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-27 22:21:40 +0000
commit66a7c0cd84eb5303ba95f4be9f633b31b1cf4722 (patch)
tree480a003ea9e3e4d40a339249cd2e77ec3aaa938f /ui/views/examples
parent9732a2451ddb5f9908301c5b3c8670073730560c (diff)
downloadchromium_src-66a7c0cd84eb5303ba95f4be9f633b31b1cf4722.zip
chromium_src-66a7c0cd84eb5303ba95f4be9f633b31b1cf4722.tar.gz
chromium_src-66a7c0cd84eb5303ba95f4be9f633b31b1cf4722.tar.bz2
Enable logging in Views Examples.
BUG=none TEST=Check that Sawbuck shows logs output by views_examples. Review URL: http://codereview.chromium.org/10255013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134372 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/examples')
-rw-r--r--ui/views/examples/content_client/examples_main_delegate.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/views/examples/content_client/examples_main_delegate.cc b/ui/views/examples/content_client/examples_main_delegate.cc
index 434e46f..2cf5cc4 100644
--- a/ui/views/examples/content_client/examples_main_delegate.cc
+++ b/ui/views/examples/content_client/examples_main_delegate.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/file_path.h"
+#include "base/logging.h"
#include "base/path_service.h"
#include "content/public/browser/browser_main_runner.h"
#include "content/public/common/content_switches.h"
@@ -16,10 +17,21 @@
#include "ui/base/ui_base_paths.h"
#include "ui/views/examples/content_client/examples_content_browser_client.h"
+#if defined(OS_WIN)
+#include "base/logging_win.h"
+#endif
+
namespace views {
namespace examples {
namespace {
+#if defined(OS_WIN)
+// {83FAC8EE-7A0E-4dbb-A3F6-6F500D7CAB1A}
+const GUID kViewsExamplesProviderName =
+ { 0x83fac8ee, 0x7a0e, 0x4dbb,
+ { 0xa3, 0xf6, 0x6f, 0x50, 0xd, 0x7c, 0xab, 0x1a } };
+#endif
+
int ExamplesBrowserMain(
const content::MainFunctionParams& main_function_params) {
scoped_ptr<content::BrowserMainRunner> main_runner(
@@ -47,6 +59,17 @@ bool ExamplesMainDelegate::BasicStartupComplete(int* exit_code) {
content::SetContentClient(&content_client_);
InitializeShellContentClient(process_type);
+
+ bool success = logging::InitLogging(NULL,
+ logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
+ logging::LOCK_LOG_FILE,
+ logging::DELETE_OLD_LOG_FILE,
+ logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+ CHECK(success);
+#if defined(OS_WIN)
+ logging::LogEventProvider::Initialize(kViewsExamplesProviderName);
+#endif
+
return false;
}