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

Side by Side Diff: components/breakpad/app/breakpad_linux.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: nits:grt 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
« no previous file with comments | « components/breakpad/app/breakpad_client.cc ('k') | components/breakpad/app/breakpad_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // For linux_syscall_support.h. This makes it safe to call embedded system 5 // For linux_syscall_support.h. This makes it safe to call embedded system
6 // calls when in seccomp mode. 6 // calls when in seccomp mode.
7 7
8 #include "components/breakpad/app/breakpad_linux.h" 8 #include "components/breakpad/app/breakpad_linux.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 while (len > 0 && str[len - 1] == ' ') { 199 while (len > 0 && str[len - 1] == ' ') {
200 len--; 200 len--;
201 } 201 }
202 return len; 202 return len;
203 } 203 }
204 204
205 void SetClientIdFromCommandLine(const CommandLine& command_line) { 205 void SetClientIdFromCommandLine(const CommandLine& command_line) {
206 // Get the guid from the command line switch. 206 // Get the guid from the command line switch.
207 std::string switch_value = 207 std::string switch_value =
208 command_line.GetSwitchValueASCII(switches::kEnableCrashReporter); 208 command_line.GetSwitchValueASCII(switches::kEnableCrashReporter);
209 GetBreakpadClient()->SetClientID(switch_value); 209 GetBreakpadClient()->SetBreakpadClientIdFromGUID(switch_value);
210 } 210 }
211 211
212 // MIME substrings. 212 // MIME substrings.
213 #if defined(OS_CHROMEOS) 213 #if defined(OS_CHROMEOS)
214 const char g_sep[] = ":"; 214 const char g_sep[] = ":";
215 #endif 215 #endif
216 const char g_rn[] = "\r\n"; 216 const char g_rn[] = "\r\n";
217 const char g_form_data_msg[] = "Content-Disposition: form-data; name=\""; 217 const char g_form_data_msg[] = "Content-Disposition: form-data; name=\"";
218 const char g_quote_msg[] = "\""; 218 const char g_quote_msg[] = "\"";
219 const char g_dashdash_msg[] = "--"; 219 const char g_dashdash_msg[] = "--";
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 } 1606 }
1607 } 1607 }
1608 } 1608 }
1609 #endif // OS_ANDROID 1609 #endif // OS_ANDROID
1610 1610
1611 bool IsCrashReporterEnabled() { 1611 bool IsCrashReporterEnabled() {
1612 return g_is_crash_reporter_enabled; 1612 return g_is_crash_reporter_enabled;
1613 } 1613 }
1614 1614
1615 } // namespace breakpad 1615 } // namespace breakpad
OLDNEW
« no previous file with comments | « components/breakpad/app/breakpad_client.cc ('k') | components/breakpad/app/breakpad_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698