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

Side by Side Diff: chrome/common/child_process_logging_win.cc

Issue 365133005: Refactor SetClientID such that metrics rather than crash backs up the client id in Google Update set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix posix compile? Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/child_process_logging.h" 5 #include "chrome/common/child_process_logging.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } // namespace 58 } // namespace
59 59
60 void Init() { 60 void Init() {
61 // Note: on other platforms, this is set up during Breakpad initialization, 61 // Note: on other platforms, this is set up during Breakpad initialization,
62 // in ChromeBreakpadClient. But on Windows, that is before the DLL module is 62 // in ChromeBreakpadClient. But on Windows, that is before the DLL module is
63 // loaded, which is a prerequisite of the crash key system. 63 // loaded, which is a prerequisite of the crash key system.
64 crash_keys::RegisterChromeCrashKeys(); 64 crash_keys::RegisterChromeCrashKeys();
65 base::debug::SetCrashKeyReportingFunctions( 65 base::debug::SetCrashKeyReportingFunctions(
66 &SetCrashKeyValueTrampoline, &ClearCrashKeyValueTrampoline); 66 &SetCrashKeyValueTrampoline, &ClearCrashKeyValueTrampoline);
67 67
68 // This would be handled by BreakpadClient::SetClientID(), but because of the 68 // This would be handled by BreakpadClient::SetBreakpadClientID(), but because
grt (UTC plus 2) 2014/07/09 12:59:59 SetBreakpadClientID -> SetBreakpadClientIdFromGUID
gab 2014/07/09 14:42:38 Done.
69 // aforementioned issue, crash keys aren't ready yet at the time of Breakpad 69 // of the aforementioned issue, crash keys aren't ready yet at the time of
70 // initialization. 70 // Breakpad initialization, load the client id backed up in Google Update
71 std::string client_id; 71 // settings instead.
72 if (GoogleUpdateSettings::GetMetricsId(&client_id)) 72 std::string client_guid;
73 base::debug::SetCrashKeyValue(crash_keys::kClientID, client_id); 73 if (GoogleUpdateSettings::LoadMetricsClientId(&client_guid))
74 crash_keys::SetCrashClientIdFromGUID(client_guid);
74 } 75 }
75 76
76 } // namespace child_process_logging 77 } // namespace child_process_logging
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698