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

Side by Side Diff: chrome/common/child_process_logging_mac.mm

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 SetActiveURLImpl(url, SetCrashKeyValue, ClearCrashKey); 88 SetActiveURLImpl(url, SetCrashKeyValue, ClearCrashKey);
89 } 89 }
90 90
91 void SetClientId(const std::string& client_id) { 91 void SetClientId(const std::string& client_id) {
92 std::string str(client_id); 92 std::string str(client_id);
93 ReplaceSubstringsAfterOffset(&str, 0, "-", ""); 93 ReplaceSubstringsAfterOffset(&str, 0, "-", "");
94 94
95 base::strlcpy(g_client_id, str.c_str(), kClientIdSize); 95 base::strlcpy(g_client_id, str.c_str(), kClientIdSize);
96 SetClientIdImpl(str, SetCrashKeyValue); 96 SetClientIdImpl(str, SetCrashKeyValue);
97 97
98 std::wstring wstr = ASCIIToWide(str); 98 std::wstring wstr = base::ASCIIToWide(str);
99 GoogleUpdateSettings::SetMetricsId(wstr); 99 GoogleUpdateSettings::SetMetricsId(wstr);
100 } 100 }
101 101
102 std::string GetClientId() { 102 std::string GetClientId() {
103 return std::string(g_client_id); 103 return std::string(g_client_id);
104 } 104 }
105 105
106 void SetActiveExtensions(const std::set<std::string>& extension_ids) { 106 void SetActiveExtensions(const std::set<std::string>& extension_ids) {
107 // Log the count separately to track heavy users. 107 // Log the count separately to track heavy users.
108 const int count = static_cast<int>(extension_ids.size()); 108 const int count = static_cast<int>(extension_ids.size());
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 base::StringPrintf("%zu", experiments.size())); 232 base::StringPrintf("%zu", experiments.size()));
233 } 233 }
234 234
235 void SetChannel(const std::string& channel) { 235 void SetChannel(const std::string& channel) {
236 // This should match the corresponding string in breakpad_win.cc. 236 // This should match the corresponding string in breakpad_win.cc.
237 const std::string kChannelKey = "channel"; 237 const std::string kChannelKey = "channel";
238 SetCrashKeyValue(kChannelKey, channel); 238 SetCrashKeyValue(kChannelKey, channel);
239 } 239 }
240 240
241 } // namespace child_process_logging 241 } // namespace child_process_logging
OLDNEW
« no previous file with comments | « chrome/browser/webdata/logins_table_win.cc ('k') | chrome/common/child_process_logging_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698