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

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

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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.cc ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/string_number_conversions.h"
9 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h"
10 #include "chrome/common/gpu_info.h" 12 #include "chrome/common/gpu_info.h"
11 #include "chrome/installer/util/google_update_settings.h" 13 #include "chrome/installer/util/google_update_settings.h"
12 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
13 15
14 namespace child_process_logging { 16 namespace child_process_logging {
15 17
16 const int kMaxNumCrashURLChunks = 8; 18 const int kMaxNumCrashURLChunks = 8;
17 const int kMaxNumURLChunkValueLength = 255; 19 const int kMaxNumURLChunkValueLength = 255;
18 const char *kUrlChunkFormatStr = "url-chunk-%d"; 20 const char *kUrlChunkFormatStr = "url-chunk-%d";
19 const char *kGuidParamName = "guid"; 21 const char *kGuidParamName = "guid";
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void SetGpuKeyValue(const char* param_name, const std::string& value_str, 107 void SetGpuKeyValue(const char* param_name, const std::string& value_str,
106 SetCrashKeyValueFuncPtr set_key_func) { 108 SetCrashKeyValueFuncPtr set_key_func) {
107 NSString *key = [NSString stringWithUTF8String:param_name]; 109 NSString *key = [NSString stringWithUTF8String:param_name];
108 NSString *value = [NSString stringWithUTF8String:value_str.c_str()]; 110 NSString *value = [NSString stringWithUTF8String:value_str.c_str()];
109 set_key_func(key, value); 111 set_key_func(key, value);
110 } 112 }
111 113
112 void SetGpuInfoImpl(const GPUInfo& gpu_info, 114 void SetGpuInfoImpl(const GPUInfo& gpu_info,
113 SetCrashKeyValueFuncPtr set_key_func) { 115 SetCrashKeyValueFuncPtr set_key_func) {
114 SetGpuKeyValue(kGPUVendorIdParamName, 116 SetGpuKeyValue(kGPUVendorIdParamName,
115 UintToString(gpu_info.vendor_id()), 117 base::UintToString(gpu_info.vendor_id()),
116 set_key_func); 118 set_key_func);
117 SetGpuKeyValue(kGPUDeviceIdParamName, 119 SetGpuKeyValue(kGPUDeviceIdParamName,
118 UintToString(gpu_info.device_id()), 120 base::UintToString(gpu_info.device_id()),
119 set_key_func); 121 set_key_func);
120 SetGpuKeyValue(kGPUDriverVersionParamName, 122 SetGpuKeyValue(kGPUDriverVersionParamName,
121 WideToASCII(gpu_info.driver_version()), 123 WideToUTF8(gpu_info.driver_version()),
122 set_key_func); 124 set_key_func);
123 SetGpuKeyValue(kGPUPixelShaderVersionParamName, 125 SetGpuKeyValue(kGPUPixelShaderVersionParamName,
124 UintToString(gpu_info.pixel_shader_version()), 126 base::UintToString(gpu_info.pixel_shader_version()),
125 set_key_func); 127 set_key_func);
126 SetGpuKeyValue(kGPUVertexShaderVersionParamName, 128 SetGpuKeyValue(kGPUVertexShaderVersionParamName,
127 UintToString(gpu_info.vertex_shader_version()), 129 base::UintToString(gpu_info.vertex_shader_version()),
128 set_key_func); 130 set_key_func);
129 } 131 }
130 132
131 void SetGpuInfo(const GPUInfo& gpu_info) { 133 void SetGpuInfo(const GPUInfo& gpu_info) {
132 if (g_set_key_func) 134 if (g_set_key_func)
133 SetGpuInfoImpl(gpu_info, g_set_key_func); 135 SetGpuInfoImpl(gpu_info, g_set_key_func);
134 } 136 }
135 137
136 } // namespace child_process_logging 138 } // namespace child_process_logging
OLDNEW
« no previous file with comments | « chrome/common/child_process.cc ('k') | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698