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

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

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
« no previous file with comments | « chrome/common/child_process_logging_mac.mm ('k') | chrome/common/child_process_logging_win.cc » ('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 (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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 void SetClientId(const std::string& client_id) { 67 void SetClientId(const std::string& client_id) {
68 std::string str(client_id); 68 std::string str(client_id);
69 ReplaceSubstringsAfterOffset(&str, 0, "-", ""); 69 ReplaceSubstringsAfterOffset(&str, 0, "-", "");
70 70
71 if (str.empty()) 71 if (str.empty())
72 return; 72 return;
73 73
74 base::strlcpy(g_client_id, str.c_str(), kClientIdSize); 74 base::strlcpy(g_client_id, str.c_str(), kClientIdSize);
75 std::wstring wstr = ASCIIToWide(str); 75 std::wstring wstr = base::ASCIIToWide(str);
76 GoogleUpdateSettings::SetMetricsId(wstr); 76 GoogleUpdateSettings::SetMetricsId(wstr);
77 } 77 }
78 78
79 std::string GetClientId() { 79 std::string GetClientId() {
80 return std::string(g_client_id); 80 return std::string(g_client_id);
81 } 81 }
82 82
83 void SetActiveExtensions(const std::set<std::string>& extension_ids) { 83 void SetActiveExtensions(const std::set<std::string>& extension_ids) {
84 snprintf(g_num_extensions, arraysize(g_num_extensions), "%" PRIuS, 84 snprintf(g_num_extensions, arraysize(g_num_extensions), "%" PRIuS,
85 extension_ids.size()); 85 extension_ids.size());
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // simultaneously. 169 // simultaneously.
170 snprintf(g_num_variations, arraysize(g_num_variations), "%" PRIuS, 170 snprintf(g_num_variations, arraysize(g_num_variations), "%" PRIuS,
171 experiments.size()); 171 experiments.size());
172 } 172 }
173 173
174 void SetChannel(const std::string& channel) { 174 void SetChannel(const std::string& channel) {
175 base::strlcpy(g_channel, channel.c_str(), arraysize(g_channel)); 175 base::strlcpy(g_channel, channel.c_str(), arraysize(g_channel));
176 } 176 }
177 177
178 } // namespace child_process_logging 178 } // namespace child_process_logging
OLDNEW
« no previous file with comments | « chrome/common/child_process_logging_mac.mm ('k') | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698