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

Side by Side Diff: chrome/browser/ui/profile_error_dialog.cc

Issue 2896133002: Make profile error dialog checkbox opt-in and improve feedback description (Closed)
Patch Set: Nit Created 3 years, 7 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/simple_message_box_views.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 #include "chrome/browser/ui/profile_error_dialog.h" 5 #include "chrome/browser/ui/profile_error_dialog.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 28 matching lines...) Expand all
39 if (is_showing_profile_error_dialog) 39 if (is_showing_profile_error_dialog)
40 return; 40 return;
41 41
42 base::AutoReset<bool> resetter(&is_showing_profile_error_dialog, true); 42 base::AutoReset<bool> resetter(&is_showing_profile_error_dialog, true);
43 if (chrome::ShowWarningMessageBoxWithCheckbox( 43 if (chrome::ShowWarningMessageBoxWithCheckbox(
44 nullptr, l10n_util::GetStringUTF16(IDS_PROFILE_ERROR_DIALOG_TITLE), 44 nullptr, l10n_util::GetStringUTF16(IDS_PROFILE_ERROR_DIALOG_TITLE),
45 l10n_util::GetStringUTF16(message_id), 45 l10n_util::GetStringUTF16(message_id),
46 l10n_util::GetStringUTF16(IDS_PROFILE_ERROR_DIALOG_CHECKBOX))) { 46 l10n_util::GetStringUTF16(IDS_PROFILE_ERROR_DIALOG_CHECKBOX))) {
47 std::string feedback_description = 47 std::string feedback_description =
48 l10n_util::GetStringUTF8(IDS_PROFILE_ERROR_FEEDBACK_DESCRIPTION); 48 l10n_util::GetStringUTF8(IDS_PROFILE_ERROR_FEEDBACK_DESCRIPTION);
49 feedback_description += "\n" + diagnostics; 49 if (!diagnostics.empty()) {
50 // TODO(afakhry): Add support to inject diagnostics to the feedback
51 // reports without adding them to the description. crbug.com/708511.
52 feedback_description += "\n\n" +
53 l10n_util::GetStringUTF8(
54 IDS_PROFILE_ERROR_FEEDBACK_DIAGNOSTICS_LINE) +
55 diagnostics;
56 }
50 57
51 chrome::ShowFeedbackPage(nullptr, chrome::kFeedbackSourceProfileErrorDialog, 58 chrome::ShowFeedbackPage(nullptr, chrome::kFeedbackSourceProfileErrorDialog,
52 feedback_description, 59 feedback_description,
53 kProfileErrorFeedbackCategory); 60 kProfileErrorFeedbackCategory);
54 } 61 }
55 #endif 62 #endif
56 } 63 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/views/simple_message_box_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698