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

Unified Diff: chrome_frame/chrome_tab.cc

Issue 9487011: Generate ETW events in Chrome Frame under the control of the same env var as Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/chrome_tab.cc
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index 6e0373bac0e034be0edefd3b3515d4e7d2d30964..69e72f624b728ffaeb3f529126fdabd109794e85 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,10 +22,12 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
+#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "base/win/windows_version.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/env_vars.h"
#include "chrome/installer/util/google_update_settings.h"
#include "chrome_frame/bho.h"
#include "chrome_frame/chrome_active_document.h"
@@ -833,6 +835,12 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
logging::DELETE_OLD_LOG_FILE,
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
+ // Log the same items as Chrome.
+ logging::SetLogItems(true, // enable_process_id
+ true, // enable_thread_id
+ false, // enable_timestamp
+ true); // enable_tickcount
+
DllRedirector* dll_redirector = DllRedirector::GetInstance();
DCHECK(dll_redirector);
@@ -845,8 +853,11 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
<< "Found CF module with no DllGetClassObject export.";
}
- // Enable ETW logging.
- logging::LogEventProvider::Initialize(kChromeFrameProvider);
+ // Enable trace control and transport through event tracing for Windows.
+ if (::GetEnvironmentVariable(ASCIIToWide(env_vars::kEtwLogging).c_str(),
+ NULL, 0)) {
+ logging::LogEventProvider::Initialize(kChromeFrameProvider);
+ }
} else if (reason == DLL_PROCESS_DETACH) {
DllRedirector* dll_redirector = DllRedirector::GetInstance();
DCHECK(dll_redirector);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698