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

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: cleanup 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::SetClientID(), but because of the
69 // aforementioned issue, crash keys aren't ready yet at the time of Breakpad 69 // aforementioned issue, crash keys aren't ready yet at the time of Breakpad
70 // initialization. 70 // initialization, retrieve the client id backed up in Google Update settings
71 // instead.
71 std::string client_id; 72 std::string client_id;
Ilya Sherman 2014/07/08 03:21:38 nit: Should the variable name be updated here to i
gab 2014/07/08 18:42:22 Done.
72 if (GoogleUpdateSettings::GetMetricsId(&client_id)) 73 if (GoogleUpdateSettings::RetrieveMetricsID(&client_id))
73 base::debug::SetCrashKeyValue(crash_keys::kClientID, client_id); 74 crash_keys::SetClientIDFromGUID(client_id);
74 } 75 }
75 76
76 } // namespace child_process_logging 77 } // namespace child_process_logging
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698