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

Unified Diff: chrome/browser/profile_resetter/resettable_settings_snapshot.cc

Issue 533183002: Revert "Eliminate all code related to the AutomaticProfileResetter." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profile_resetter/resettable_settings_snapshot.cc
diff --git a/chrome/browser/profile_resetter/resettable_settings_snapshot.cc b/chrome/browser/profile_resetter/resettable_settings_snapshot.cc
index 439153c017971521a2614ebc6f37b3f8b21d76ff..fb58ee387c38371b040a0c301e3596e60d43dfe2 100644
--- a/chrome/browser/profile_resetter/resettable_settings_snapshot.cc
+++ b/chrome/browser/profile_resetter/resettable_settings_snapshot.cc
@@ -29,7 +29,8 @@ using feedback::FeedbackData;
namespace {
-// Feedback bucket label.
+// Feedback bucket labels.
+const char kProfileResetPromptBucket[] = "SamplingOfSettingsResetPrompt";
const char kProfileResetWebUIBucket[] = "ProfileResetReport";
// Dictionary keys for feedback report.
@@ -219,9 +220,19 @@ std::string SerializeSettingsReport(const ResettableSettingsSnapshot& snapshot,
}
void SendSettingsFeedback(const std::string& report,
- Profile* profile) {
+ Profile* profile,
+ SnapshotCaller caller) {
scoped_refptr<FeedbackData> feedback_data = new FeedbackData();
- feedback_data->set_category_tag(kProfileResetWebUIBucket);
+ std::string bucket;
+ switch (caller) {
+ case PROFILE_RESET_WEBUI:
+ bucket = kProfileResetWebUIBucket;
+ break;
+ case PROFILE_RESET_PROMPT:
+ bucket = kProfileResetPromptBucket;
+ break;
+ }
+ feedback_data->set_category_tag(bucket);
feedback_data->set_description(report);
feedback_data->set_image(make_scoped_ptr(new std::string));

Powered by Google App Engine
This is Rietveld 408576698