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

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

Issue 7324017: Split SystemAccess into TimezoneSettings, StatisticsProvider, and SyslogsProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a missing include Created 9 years, 5 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"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const std::string& page_url_text, 253 const std::string& page_url_text,
254 const std::string& description, 254 const std::string& description,
255 const char* png_data, 255 const char* png_data,
256 int png_data_length, 256 int png_data_length,
257 int png_width, 257 int png_width,
258 #if defined(OS_CHROMEOS) 258 #if defined(OS_CHROMEOS)
259 int png_height, 259 int png_height,
260 const std::string& user_email_text, 260 const std::string& user_email_text,
261 const char* zipped_logs_data, 261 const char* zipped_logs_data,
262 int zipped_logs_length, 262 int zipped_logs_length,
263 const chromeos::LogDictionaryType* const sys_info) { 263 const chromeos::system::LogDictionaryType* const sys_info) {
264 #else 264 #else
265 int png_height) { 265 int png_height) {
266 #endif 266 #endif
267 // Create google feedback protocol buffer objects 267 // Create google feedback protocol buffer objects
268 userfeedback::ExternalExtensionSubmit feedback_data; 268 userfeedback::ExternalExtensionSubmit feedback_data;
269 // type id set to 0, unused field but needs to be initialized to 0 269 // type id set to 0, unused field but needs to be initialized to 0
270 feedback_data.set_type_id(0); 270 feedback_data.set_type_id(0);
271 271
272 userfeedback::CommonData* common_data = feedback_data.mutable_common_data(); 272 userfeedback::CommonData* common_data = feedback_data.mutable_common_data();
273 userfeedback::WebData* web_data = feedback_data.mutable_web_data(); 273 userfeedback::WebData* web_data = feedback_data.mutable_web_data();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 *(screenshot.mutable_dimensions()) = dimensions; 319 *(screenshot.mutable_dimensions()) = dimensions;
320 screenshot.set_binary_content(std::string(png_data, png_data_length)); 320 screenshot.set_binary_content(std::string(png_data, png_data_length));
321 321
322 // Set the screenshot object in feedback 322 // Set the screenshot object in feedback
323 *(feedback_data.mutable_screenshot()) = screenshot; 323 *(feedback_data.mutable_screenshot()) = screenshot;
324 } 324 }
325 325
326 #if defined(OS_CHROMEOS) 326 #if defined(OS_CHROMEOS)
327 if (sys_info) { 327 if (sys_info) {
328 // Add the product specific data 328 // Add the product specific data
329 for (chromeos::LogDictionaryType::const_iterator i = sys_info->begin(); 329 for (chromeos::system::LogDictionaryType::const_iterator i =
330 sys_info->begin();
330 i != sys_info->end(); ++i) 331 i != sys_info->end(); ++i)
stevenjb 2011/07/08 22:38:09 nit: combine above two lines and fix indent.
satorux1 2011/07/09 06:21:27 Done.
331 if (!CommandLine::ForCurrentProcess()->HasSwitch( 332 if (!CommandLine::ForCurrentProcess()->HasSwitch(
332 switches::kCompressSystemFeedback) || ValidFeedbackSize(i->second)) { 333 switches::kCompressSystemFeedback) || ValidFeedbackSize(i->second)) {
333 AddFeedbackData(&feedback_data, i->first, i->second); 334 AddFeedbackData(&feedback_data, i->first, i->second);
334 } 335 }
335 336
336 // If we have zipped logs, add them here 337 // If we have zipped logs, add them here
337 if (zipped_logs_data && CommandLine::ForCurrentProcess()->HasSwitch( 338 if (zipped_logs_data && CommandLine::ForCurrentProcess()->HasSwitch(
338 switches::kCompressSystemFeedback)) { 339 switches::kCompressSystemFeedback)) {
339 userfeedback::ProductSpecificBinaryData attachment; 340 userfeedback::ProductSpecificBinaryData attachment;
340 attachment.set_mime_type(kBZip2MimeType); 341 attachment.set_mime_type(kBZip2MimeType);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // static 377 // static
377 void BugReportUtil::ReportPhishing(TabContents* currentTab, 378 void BugReportUtil::ReportPhishing(TabContents* currentTab,
378 const std::string& phishing_url) { 379 const std::string& phishing_url) {
379 currentTab->controller().LoadURL( 380 currentTab->controller().LoadURL(
380 safe_browsing_util::GeneratePhishingReportUrl( 381 safe_browsing_util::GeneratePhishingReportUrl(
381 kReportPhishingUrl, phishing_url, 382 kReportPhishingUrl, phishing_url,
382 false /* not client-side detection */), 383 false /* not client-side detection */),
383 GURL(), 384 GURL(),
384 PageTransition::LINK); 385 PageTransition::LINK);
385 } 386 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698