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

Side by Side Diff: chrome/browser/bug_report_util.cc

Issue 7633055: base: Fix the TODO in string_util.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chrome_mini_installer.cc Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/bug_report_util.h" 5 #include "chrome/browser/bug_report_util.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/file_version_info.h" 12 #include "base/file_version_info.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/stringprintf.h"
15 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
16 #include "base/win/windows_version.h" 17 #include "base/win/windows_version.h"
17 #include "chrome/browser/browser_process_impl.h" 18 #include "chrome/browser/browser_process_impl.h"
18 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/safe_browsing/safe_browsing_util.h" 20 #include "chrome/browser/safe_browsing/safe_browsing_util.h"
20 #include "chrome/browser/ui/browser_list.h" 21 #include "chrome/browser/ui/browser_list.h"
21 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
22 #include "chrome/common/chrome_version_info.h" 23 #include "chrome/common/chrome_version_info.h"
23 #include "content/browser/tab_contents/tab_contents.h" 24 #include "content/browser/tab_contents/tab_contents.h"
24 #include "content/common/url_fetcher.h" 25 #include "content/common/url_fetcher.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 delete source; 152 delete source;
152 // And then delete ourselves. 153 // And then delete ourselves.
153 delete this; 154 delete this;
154 } 155 }
155 156
156 // static 157 // static
157 void BugReportUtil::SetOSVersion(std::string* os_version) { 158 void BugReportUtil::SetOSVersion(std::string* os_version) {
158 #if defined(OS_WIN) 159 #if defined(OS_WIN)
159 base::win::OSInfo* os_info = base::win::OSInfo::GetInstance(); 160 base::win::OSInfo* os_info = base::win::OSInfo::GetInstance();
160 base::win::OSInfo::VersionNumber version_number = os_info->version_number(); 161 base::win::OSInfo::VersionNumber version_number = os_info->version_number();
161 *os_version = StringPrintf("%d.%d.%d", version_number.major, 162 *os_version = base::StringPrintf("%d.%d.%d",
162 version_number.minor, version_number.build); 163 version_number.major,
164 version_number.minor,
165 version_number.build);
163 int service_pack = os_info->service_pack().major; 166 int service_pack = os_info->service_pack().major;
164 if (service_pack > 0) 167 if (service_pack > 0)
165 os_version->append(StringPrintf("Service Pack %d", service_pack)); 168 os_version->append(base::StringPrintf("Service Pack %d", service_pack));
166 #elif defined(OS_MACOSX) 169 #elif defined(OS_MACOSX)
167 *os_version = base::SysInfo::OperatingSystemVersion(); 170 *os_version = base::SysInfo::OperatingSystemVersion();
168 #else 171 #else
169 *os_version = "unknown"; 172 *os_version = "unknown";
170 #endif 173 #endif
171 } 174 }
172 175
173 // static 176 // static
174 std::string BugReportUtil::feedback_server_(""); 177 std::string BugReportUtil::feedback_server_("");
175 178
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 if (screenshot_size == NULL) 408 if (screenshot_size == NULL)
406 screenshot_size = new gfx::Rect(); 409 screenshot_size = new gfx::Rect();
407 return *screenshot_size; 410 return *screenshot_size;
408 } 411 }
409 412
410 // static 413 // static
411 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) { 414 void BugReportUtil::SetScreenshotSize(const gfx::Rect& rect) {
412 gfx::Rect& screen_size = GetScreenshotSize(); 415 gfx::Rect& screen_size = GetScreenshotSize();
413 screen_size = rect; 416 screen_size = rect;
414 } 417 }
OLDNEW
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/browser/chromeos/input_method/input_method_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698