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

Side by Side Diff: chrome/browser/feedback/feedback_util.h

Issue 12529024: Fix feedback log collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/feedback/feedback_data.cc ('k') | chrome/browser/feedback/feedback_util.cc » ('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) 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"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "chrome/browser/feedback/feedback_data.h" 12 #include "chrome/browser/feedback/feedback_data.h"
13 #include "chrome/browser/feedback/proto/common.pb.h" 13 #include "chrome/browser/feedback/proto/common.pb.h"
14 #include "chrome/browser/feedback/proto/dom.pb.h" 14 #include "chrome/browser/feedback/proto/dom.pb.h"
15 #include "chrome/browser/feedback/proto/extension.pb.h" 15 #include "chrome/browser/feedback/proto/extension.pb.h"
16 #include "chrome/browser/feedback/proto/math.pb.h" 16 #include "chrome/browser/feedback/proto/math.pb.h"
17 #include "chrome/browser/ui/webui/screenshot_source.h" 17 #include "chrome/browser/ui/webui/screenshot_source.h"
18 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
19 19
20 #if defined(OS_MACOSX) 20 #if defined(OS_MACOSX)
21 #include "base/sys_info.h" 21 #include "base/sys_info.h"
22 #elif defined(OS_WIN) 22 #elif defined(OS_WIN)
23 #include "base/win/windows_version.h" 23 #include "base/win/windows_version.h"
24 #elif defined(OS_CHROMEOS) 24 #elif defined(OS_CHROMEOS)
25 #include "chrome/browser/chromeos/cros/cros_library.h" 25 #include "chrome/browser/chromeos/cros/cros_library.h"
26 #include "chrome/browser/chromeos/system/syslogs_provider.h"
27 #endif 26 #endif
28 27
29 class Profile; 28 class Profile;
30 29
31 namespace content { 30 namespace content {
32 class WebContents; 31 class WebContents;
33 } 32 }
34 33
35 extern const char kSyncDataKey[]; 34 extern const char kSyncDataKey[];
36 35
37 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
38 extern const char kHUDLogDataKey[]; 37 extern const char kHUDLogDataKey[];
xiyuan 2013/03/19 02:14:48 Should we remove this?
rkc 2013/03/19 19:58:59 This is used by the touch code in syslogs provider
39 #endif 38 #endif
40 39
41 class FeedbackUtil { 40 class FeedbackUtil {
42 public: 41 public:
43 42
44 #if defined(OS_MACOSX) 43 #if defined(OS_MACOSX)
45 enum BugType { 44 enum BugType {
46 PAGE_WONT_LOAD = 0, 45 PAGE_WONT_LOAD = 0,
47 PAGE_LOOKS_ODD, 46 PAGE_LOOKS_ODD,
48 PHISHING_PAGE, 47 PHISHING_PAGE,
(...skipping 16 matching lines...) Expand all
65 // is probably the right one to extend, but will require changing 64 // is probably the right one to extend, but will require changing
66 // all the call sites or making it a wrapper around another util. 65 // all the call sites or making it a wrapper around another util.
67 static void SetOSVersion(std::string *os_version); 66 static void SetOSVersion(std::string *os_version);
68 67
69 // Send the feedback report after the specified delay 68 // Send the feedback report after the specified delay
70 static void DispatchFeedback(Profile* profile, 69 static void DispatchFeedback(Profile* profile,
71 std::string* feedback_data, 70 std::string* feedback_data,
72 int64 delay); 71 int64 delay);
73 72
74 // Generates bug report data. 73 // Generates bug report data.
75 static void SendReport(const FeedbackData& data); 74 static void SendReport(scoped_refptr<FeedbackData> data);
76 // Redirects the user to Google's phishing reporting page. 75 // Redirects the user to Google's phishing reporting page.
77 static void ReportPhishing(content::WebContents* current_tab, 76 static void ReportPhishing(content::WebContents* current_tab,
78 const std::string& phishing_url); 77 const std::string& phishing_url);
79 // Maintains a single vector of bytes to store the last screenshot taken. 78 // Maintains a single vector of bytes to store the last screenshot taken.
80 static std::vector<unsigned char>* GetScreenshotPng(); 79 static std::vector<unsigned char>* GetScreenshotPng();
81 static void ClearScreenshotPng(); 80 static void ClearScreenshotPng();
82 static void SetScreenshotSize(const gfx::Rect& rect); 81 static void SetScreenshotSize(const gfx::Rect& rect);
83 static gfx::Rect& GetScreenshotSize(); 82 static gfx::Rect& GetScreenshotSize();
84 83
85 class PostCleanup; 84 class PostCleanup;
(...skipping 10 matching lines...) Expand all
96 int64 previous_delay); 95 int64 previous_delay);
97 96
98 #if defined(OS_CHROMEOS) 97 #if defined(OS_CHROMEOS)
99 static bool ValidFeedbackSize(const std::string& content); 98 static bool ValidFeedbackSize(const std::string& content);
100 #endif 99 #endif
101 100
102 DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackUtil); 101 DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackUtil);
103 }; 102 };
104 103
105 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_UTIL_H_ 104 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/feedback/feedback_data.cc ('k') | chrome/browser/feedback/feedback_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698