| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FEEDBACK_FEEDBACK_UTIL_H_ | 5 #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_UTIL_H_ |
| 6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_UTIL_H_ | 6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // Generates bug report data. | 69 // Generates bug report data. |
| 70 static void SendReport(scoped_refptr<FeedbackData> data); | 70 static void SendReport(scoped_refptr<FeedbackData> data); |
| 71 // Redirects the user to Google's phishing reporting page. | 71 // Redirects the user to Google's phishing reporting page. |
| 72 static void ReportPhishing(content::WebContents* current_tab, | 72 static void ReportPhishing(content::WebContents* current_tab, |
| 73 const std::string& phishing_url); | 73 const std::string& phishing_url); |
| 74 // Maintains a single vector of bytes to store the last screenshot taken. | 74 // Maintains a single vector of bytes to store the last screenshot taken. |
| 75 static std::vector<unsigned char>* GetScreenshotPng(); | 75 static std::vector<unsigned char>* GetScreenshotPng(); |
| 76 static void ClearScreenshotPng(); | 76 static void ClearScreenshotPng(); |
| 77 static void SetScreenshotSize(const gfx::Rect& rect); | 77 static void SetScreenshotSize(const gfx::Rect& rect); |
| 78 static gfx::Rect& GetScreenshotSize(); | 78 static gfx::Rect& GetScreenshotSize(); |
| 79 #if defined(OS_CHROMEOS) |
| 79 static bool ZipString(const std::string& logs, std::string* compressed_logs); | 80 static bool ZipString(const std::string& logs, std::string* compressed_logs); |
| 81 #endif |
| 80 | 82 |
| 81 class PostCleanup; | 83 class PostCleanup; |
| 82 | 84 |
| 83 private: | 85 private: |
| 84 // Add a key value pair to the feedback object | 86 // Add a key value pair to the feedback object |
| 85 static void AddFeedbackData( | 87 static void AddFeedbackData( |
| 86 userfeedback::ExtensionSubmit* feedback_data, | 88 userfeedback::ExtensionSubmit* feedback_data, |
| 87 const std::string& key, const std::string& value); | 89 const std::string& key, const std::string& value); |
| 88 | 90 |
| 89 // Send the feedback report | 91 // Send the feedback report |
| 90 static void SendFeedback(Profile* profile, | 92 static void SendFeedback(Profile* profile, |
| 91 std::string* feedback_data, | 93 std::string* feedback_data, |
| 92 int64 previous_delay); | 94 int64 previous_delay); |
| 93 | 95 |
| 94 #if defined(OS_CHROMEOS) | 96 #if defined(OS_CHROMEOS) |
| 95 static bool ValidFeedbackSize(const std::string& content); | 97 static bool ValidFeedbackSize(const std::string& content); |
| 96 #endif | 98 #endif |
| 97 | 99 |
| 98 DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackUtil); | 100 DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackUtil); |
| 99 }; | 101 }; |
| 100 | 102 |
| 101 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_UTIL_H_ | 103 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_UTIL_H_ |
| OLD | NEW |