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

Side by Side Diff: components/feedback/feedback_common.h

Issue 2189353003: Sent feedback reports must respect the product ID if any was provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_FEEDBACK_FEEDBACK_COMMON_H_ 5 #ifndef COMPONENTS_FEEDBACK_FEEDBACK_COMMON_H_
6 #define COMPONENTS_FEEDBACK_FEEDBACK_COMMON_H_ 6 #define COMPONENTS_FEEDBACK_FEEDBACK_COMMON_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void AddLogs(std::unique_ptr<SystemLogsMap> logs); 58 void AddLogs(std::unique_ptr<SystemLogsMap> logs);
59 void CompressLogs(); 59 void CompressLogs();
60 60
61 void AddFilesAndLogsToReport( 61 void AddFilesAndLogsToReport(
62 userfeedback::ExtensionSubmit* feedback_data) const; 62 userfeedback::ExtensionSubmit* feedback_data) const;
63 63
64 // Fill in |feedback_data| with all the data that we have collected. 64 // Fill in |feedback_data| with all the data that we have collected.
65 // CompressLogs() must have already been called. 65 // CompressLogs() must have already been called.
66 void PrepareReport(userfeedback::ExtensionSubmit* feedback_data) const; 66 void PrepareReport(userfeedback::ExtensionSubmit* feedback_data) const;
67 67
68 // Returns true if a product ID was set in the feedback report.
69 bool HasProductId() const { return product_id_ != -1; }
rkc 2016/07/30 23:46:39 Could this be private? We can always move the frie
afakhry 2016/08/02 00:49:36 Done. I actually moved it to protected, just in ca
rkc 2016/08/02 00:57:58 If it does, we can move it to protected then :) We
afakhry 2016/08/02 23:56:02 Done.
70
68 // Getters 71 // Getters
69 const std::string& category_tag() const { return category_tag_; } 72 const std::string& category_tag() const { return category_tag_; }
70 const std::string& page_url() const { return page_url_; } 73 const std::string& page_url() const { return page_url_; }
71 const std::string& description() const { return description_; } 74 const std::string& description() const { return description_; }
72 const std::string& user_email() const { return user_email_; } 75 const std::string& user_email() const { return user_email_; }
73 const std::string* image() const { return image_.get(); } 76 const std::string* image() const { return image_.get(); }
74 const SystemLogsMap* sys_info() const { return logs_.get(); } 77 const SystemLogsMap* sys_info() const { return logs_.get(); }
75 int32_t product_id() const { return product_id_; } 78 int32_t product_id() const { return product_id_; }
76 std::string user_agent() const { return user_agent_; } 79 std::string user_agent() const { return user_agent_; }
77 std::string locale() const { return locale_; } 80 std::string locale() const { return locale_; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 121
119 // It is possible that multiple attachment add calls are running in 122 // It is possible that multiple attachment add calls are running in
120 // parallel, so synchronize access. 123 // parallel, so synchronize access.
121 base::Lock attachments_lock_; 124 base::Lock attachments_lock_;
122 ScopedVector<AttachedFile> attachments_; 125 ScopedVector<AttachedFile> attachments_;
123 126
124 std::unique_ptr<SystemLogsMap> logs_; 127 std::unique_ptr<SystemLogsMap> logs_;
125 }; 128 };
126 129
127 #endif // COMPONENTS_FEEDBACK_FEEDBACK_COMMON_H_ 130 #endif // COMPONENTS_FEEDBACK_FEEDBACK_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698