diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-01 13:33:30 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-01 13:33:30 +0000 |
commit | 264c0acac963dcc09a154adc3235123b4e72b3e8 (patch) | |
tree | fc2f1ca41b46710989332aa4fd659ac55baf0f82 /chrome/common/child_process_logging_mac.mm | |
parent | fe82cc346c10b4190376bc952854026a3dfe4f3e (diff) | |
download | chromium_src-264c0acac963dcc09a154adc3235123b4e72b3e8.zip chromium_src-264c0acac963dcc09a154adc3235123b4e72b3e8.tar.gz chromium_src-264c0acac963dcc09a154adc3235123b4e72b3e8.tar.bz2 |
Set the client ID in crash reports via the crash key logging system.
BUG=77656
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/23602009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging_mac.mm')
-rw-r--r-- | chrome/common/child_process_logging_mac.mm | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/chrome/common/child_process_logging_mac.mm b/chrome/common/child_process_logging_mac.mm deleted file mode 100644 index 5747945..0000000 --- a/chrome/common/child_process_logging_mac.mm +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/common/child_process_logging.h" - -#import <Foundation/Foundation.h> - -#include "base/strings/string_util.h" -#include "base/strings/utf_string_conversions.h" -#include "chrome/installer/util/google_update_settings.h" - -namespace child_process_logging { - -using base::debug::SetCrashKeyValueFuncT; -using base::debug::ClearCrashKeyValueFuncT; -using base::debug::SetCrashKeyValue; -using base::debug::ClearCrashKey; - -const char* kGuidParamName = "guid"; - -// Account for the terminating null character. -static const size_t kClientIdSize = 32 + 1; -static char g_client_id[kClientIdSize]; - -void SetClientIdImpl(const std::string& client_id, - SetCrashKeyValueFuncT set_key_func) { - set_key_func(kGuidParamName, client_id); -} - -void SetClientId(const std::string& client_id) { - std::string str(client_id); - ReplaceSubstringsAfterOffset(&str, 0, "-", ""); - - base::strlcpy(g_client_id, str.c_str(), kClientIdSize); - SetClientIdImpl(str, SetCrashKeyValue); - - std::wstring wstr = ASCIIToWide(str); - GoogleUpdateSettings::SetMetricsId(wstr); -} - -std::string GetClientId() { - return std::string(g_client_id); -} - -} // namespace child_process_logging |