Index: chrome/app/breakpad_win.cc |
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc |
index 7cee74508b4cd286e005de65031c5ee514b0893a..100cca513b8768da2ba89384331f2c12bc15b363 100644 |
--- a/chrome/app/breakpad_win.cc |
+++ b/chrome/app/breakpad_win.cc |
@@ -7,6 +7,7 @@ |
#include <windows.h> |
#include <shellapi.h> |
#include <tchar.h> |
+#include <userenv.h> |
#include <algorithm> |
#include <vector> |
@@ -221,6 +222,35 @@ void SetPluginPath(const std::wstring& path) { |
} |
} |
+// Returns a string containing a list of all modifiers for the loaded profile. |
+std::wstring GetProfileType() { |
+ std::wstring profile_type; |
+ DWORD profile_bits = 0; |
+ if (::GetProfileType(&profile_bits)) { |
+ static const struct { |
+ DWORD bit; |
+ const wchar_t* name; |
+ } kBitNames[] = { |
+ { PT_MANDATORY, L"mandatory" }, |
+ { PT_ROAMING, L"roaming" }, |
+ { PT_TEMPORARY, L"temporary" }, |
+ }; |
+ for (size_t i = 0; i < arraysize(kBitNames); ++i) { |
+ const DWORD this_bit = kBitNames[i].bit; |
+ if ((profile_bits & this_bit) != 0) { |
+ profile_type.append(kBitNames[i].name); |
+ profile_bits &= ~this_bit; |
+ if (profile_bits != 0) |
+ profile_type.append(L", "); |
+ } |
+ } |
+ } else { |
+ DWORD last_error = ::GetLastError(); |
+ base::SStringPrintf(&profile_type, L"error %u", last_error); |
+ } |
+ return profile_type; |
+} |
+ |
// Returns the custom info structure based on the dll in parameter and the |
// process type. |
google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& exe_path, |
@@ -266,6 +296,9 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& exe_path, |
google_breakpad::CustomInfoEntry(L"ptype", type.c_str())); |
g_custom_entries->push_back( |
google_breakpad::CustomInfoEntry(L"channel", channel.c_str())); |
+ g_custom_entries->push_back( |
+ google_breakpad::CustomInfoEntry(L"profile-type", |
+ GetProfileType().c_str())); |
if (!special_build.empty()) |
g_custom_entries->push_back( |