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

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: address comments 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
« no previous file with comments | « chrome/browser/bug_report_util.h ('k') | chrome/browser/chromeos/customization_document.h » ('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) 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 i != sys_info->end(); ++i) 330 sys_info->begin(); i != sys_info->end(); ++i)
331 if (!CommandLine::ForCurrentProcess()->HasSwitch( 331 if (!CommandLine::ForCurrentProcess()->HasSwitch(
332 switches::kCompressSystemFeedback) || ValidFeedbackSize(i->second)) { 332 switches::kCompressSystemFeedback) || ValidFeedbackSize(i->second)) {
333 AddFeedbackData(&feedback_data, i->first, i->second); 333 AddFeedbackData(&feedback_data, i->first, i->second);
334 } 334 }
335 335
336 // If we have zipped logs, add them here 336 // If we have zipped logs, add them here
337 if (zipped_logs_data && CommandLine::ForCurrentProcess()->HasSwitch( 337 if (zipped_logs_data && CommandLine::ForCurrentProcess()->HasSwitch(
338 switches::kCompressSystemFeedback)) { 338 switches::kCompressSystemFeedback)) {
339 userfeedback::ProductSpecificBinaryData attachment; 339 userfeedback::ProductSpecificBinaryData attachment;
340 attachment.set_mime_type(kBZip2MimeType); 340 attachment.set_mime_type(kBZip2MimeType);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // static 376 // static
377 void BugReportUtil::ReportPhishing(TabContents* currentTab, 377 void BugReportUtil::ReportPhishing(TabContents* currentTab,
378 const std::string& phishing_url) { 378 const std::string& phishing_url) {
379 currentTab->controller().LoadURL( 379 currentTab->controller().LoadURL(
380 safe_browsing_util::GeneratePhishingReportUrl( 380 safe_browsing_util::GeneratePhishingReportUrl(
381 kReportPhishingUrl, phishing_url, 381 kReportPhishingUrl, phishing_url,
382 false /* not client-side detection */), 382 false /* not client-side detection */),
383 GURL(), 383 GURL(),
384 PageTransition::LINK); 384 PageTransition::LINK);
385 } 385 }
OLDNEW
« no previous file with comments | « chrome/browser/bug_report_util.h ('k') | chrome/browser/chromeos/customization_document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698