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

Unified Diff: chrome/common/child_process_logging_win.cc

Issue 457028: Ok, here is a different approach at this change. (Closed)
Patch Set: Be even more paranoid Created 11 years, 1 month 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/common/child_process_logging_win.cc
diff --git a/chrome/common/child_process_logging_win.cc b/chrome/common/child_process_logging_win.cc
index 94b77d895d14b0a4ae827ba8c4be571599e78984..9a11e8f5c119bd408a54824a96c7dfd05e3f6eef 100644
--- a/chrome/common/child_process_logging_win.cc
+++ b/chrome/common/child_process_logging_win.cc
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/string_util.h"
+#include "chrome/app/breakpad_win.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/installer/util/google_update_settings.h"
#include "googleurl/src/gurl.h"
@@ -18,6 +19,10 @@ typedef void (__cdecl *MainSetActiveURL)(const wchar_t*);
// exported in breakpad_win.cc: void __declspec(dllexport) __cdecl SetClientId.
typedef void (__cdecl *MainSetClientId)(const wchar_t*);
+// exported in breakpad_win.cc:
+// void __declspec(dllexport) __cdecl SetExtensionID.
+typedef void (__cdecl *MainSetExtensionID)(size_t, const wchar_t*);
+
void SetActiveURL(const GURL& url) {
static MainSetActiveURL set_active_url = NULL;
// note: benign race condition on set_active_url.
@@ -61,4 +66,24 @@ void SetClientId(const std::string& client_id) {
(set_client_id)(wstr.c_str());
}
+void SetActiveExtensions(const std::vector<std::string>& extension_ids) {
+ static MainSetExtensionID set_extension_id = NULL;
+ if (!set_extension_id) {
+ HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+ if (!exe_module)
+ return;
+ set_extension_id = reinterpret_cast<MainSetExtensionID>(
+ GetProcAddress(exe_module, "SetExtensionID"));
+ if (!set_extension_id)
+ return;
+ }
+
+ for (size_t i = 0; i < kMaxReportedActiveExtensions; ++i) {
+ if (i < extension_ids.size())
+ (set_extension_id)(i, ASCIIToWide(extension_ids[i].c_str()).c_str());
+ else
+ (set_extension_id)(i, L"");
+ }
+}
+
} // namespace child_process_logging
« no previous file with comments | « chrome/common/child_process_logging_mac.mm ('k') | chrome/renderer/extensions/extension_process_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698