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

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

Issue 7562001: Add memory usage info to SyslogsProvider, and clean up bug report screenshot data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #ifndef CHROME_BROWSER_BUG_REPORT_UTIL_H_ 5 #ifndef CHROME_BROWSER_BUG_REPORT_UTIL_H_
6 #define CHROME_BROWSER_BUG_REPORT_UTIL_H_ 6 #define CHROME_BROWSER_BUG_REPORT_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // This sets the address of the feedback server to be used by SendReport 57 // This sets the address of the feedback server to be used by SendReport
58 static void SetFeedbackServer(const std::string& server); 58 static void SetFeedbackServer(const std::string& server);
59 59
60 // Send the feedback report after the specified delay 60 // Send the feedback report after the specified delay
61 static void DispatchFeedback(Profile* profile, std::string* feedback_data, 61 static void DispatchFeedback(Profile* profile, std::string* feedback_data,
62 int64 delay); 62 int64 delay);
63 63
64 64
65 // Generates bug report data. 65 // Generates bug report data.
66 static void SendReport(Profile* profile, 66 static void SendReport(
67 int problem_type, 67 Profile* profile
68 const std::string& page_url_text, 68 , int problem_type
69 const std::string& description, 69 , const std::string& page_url_text
70 const char* png_data, 70 , const std::string& description
71 int png_data_length, 71 , const char* png_data
72 int png_width, 72 , int png_data_length
73 , int png_width
74 , int png_height
73 #if defined(OS_CHROMEOS) 75 #if defined(OS_CHROMEOS)
74 int png_height, 76 , const std::string& user_email_text
75 const std::string& user_email_text, 77 , const char* zipped_logs_data
76 const char* zipped_logs_data, 78 , int zipped_logs_length
77 int zipped_logs_length, 79 , const chromeos::system::LogDictionaryType* const sys_info
78 const chromeos::system::LogDictionaryType* const sys_info);
79 #else
80 int png_height);
81 #endif 80 #endif
82 81 );
83 // Redirects the user to Google's phishing reporting page. 82 // Redirects the user to Google's phishing reporting page.
84 static void ReportPhishing(TabContents* currentTab, 83 static void ReportPhishing(TabContents* currentTab,
85 const std::string& phishing_url); 84 const std::string& phishing_url);
85 // Maintains a single vector of bytes to store the last screenshot taken.
86 static std::vector<unsigned char>* GetScreenshotPng();
87 static void SetScreenshotSize(const gfx::Rect& rect);
88 static gfx::Rect& GetScreenshotSize();
stevenjb 2011/08/03 01:55:20 Moved from bug_report_ui.cc and re-factored.
86 89
87 class PostCleanup; 90 class PostCleanup;
88 91
89 private: 92 private:
90 // Add a key value pair to the feedback object 93 // Add a key value pair to the feedback object
91 static void AddFeedbackData( 94 static void AddFeedbackData(
92 userfeedback::ExternalExtensionSubmit* feedback_data, 95 userfeedback::ExternalExtensionSubmit* feedback_data,
93 const std::string& key, const std::string& value); 96 const std::string& key, const std::string& value);
94 97
95 // Send the feedback report 98 // Send the feedback report
96 static void SendFeedback(Profile* profile, std::string* feedback_data, 99 static void SendFeedback(Profile* profile, std::string* feedback_data,
97 int64 previous_delay); 100 int64 previous_delay);
98 101
99 #if defined(OS_CHROMEOS) 102 #if defined(OS_CHROMEOS)
100 static bool ValidFeedbackSize(const std::string& content); 103 static bool ValidFeedbackSize(const std::string& content);
101 #endif 104 #endif
102 105
103 static std::string feedback_server_; 106 static std::string feedback_server_;
104 107
105 DISALLOW_IMPLICIT_CONSTRUCTORS(BugReportUtil); 108 DISALLOW_IMPLICIT_CONSTRUCTORS(BugReportUtil);
106 }; 109 };
107 110
108 #endif // CHROME_BROWSER_BUG_REPORT_UTIL_H_ 111 #endif // CHROME_BROWSER_BUG_REPORT_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698