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

Side by Side Diff: chrome/browser/ui/views/download/download_feedback_dialog_view.cc

Issue 2802703004: Log creation for many dialog box types. (Closed)
Patch Set: Enums better match class names. Created 3 years, 8 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 #include "chrome/browser/ui/views/download/download_feedback_dialog_view.h" 5 #include "chrome/browser/ui/views/download/download_feedback_dialog_view.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/supports_user_data.h" 8 #include "base/supports_user_data.h"
9 #include "chrome/browser/platform_util.h" 9 #include "chrome/browser/platform_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser_dialogs.h"
11 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
12 #include "chrome/grit/chromium_strings.h" 13 #include "chrome/grit/chromium_strings.h"
13 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
14 #include "components/constrained_window/constrained_window_views.h" 15 #include "components/constrained_window/constrained_window_views.h"
15 #include "components/prefs/pref_service.h" 16 #include "components/prefs/pref_service.h"
16 #include "components/safe_browsing_db/safe_browsing_prefs.h" 17 #include "components/safe_browsing_db/safe_browsing_prefs.h"
17 #include "components/strings/grit/components_strings.h" 18 #include "components/strings/grit/components_strings.h"
18 #include "content/public/browser/page_navigator.h" 19 #include "content/public/browser/page_navigator.h"
19 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
20 #include "ui/views/controls/link.h" 21 #include "ui/views/controls/link.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 IDS_FEEDBACK_SERVICE_DIALOG_EXPLANATION, 86 IDS_FEEDBACK_SERVICE_DIALOG_EXPLANATION,
86 IDS_FEEDBACK_SERVICE_DIALOG_EXPLANATION_SCOUT))))), 87 IDS_FEEDBACK_SERVICE_DIALOG_EXPLANATION_SCOUT))))),
87 link_view_(new views::Link( 88 link_view_(new views::Link(
88 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE))), 89 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE))),
89 title_text_(l10n_util::GetStringUTF16(IDS_FEEDBACK_SERVICE_DIALOG_TITLE)), 90 title_text_(l10n_util::GetStringUTF16(IDS_FEEDBACK_SERVICE_DIALOG_TITLE)),
90 ok_button_text_(l10n_util::GetStringUTF16( 91 ok_button_text_(l10n_util::GetStringUTF16(
91 IDS_FEEDBACK_SERVICE_DIALOG_OK_BUTTON_LABEL)), 92 IDS_FEEDBACK_SERVICE_DIALOG_OK_BUTTON_LABEL)),
92 cancel_button_text_(l10n_util::GetStringUTF16( 93 cancel_button_text_(l10n_util::GetStringUTF16(
93 IDS_FEEDBACK_SERVICE_DIALOG_CANCEL_BUTTON_LABEL)) { 94 IDS_FEEDBACK_SERVICE_DIALOG_CANCEL_BUTTON_LABEL)) {
94 link_view_->set_listener(this); 95 link_view_->set_listener(this);
96 chrome::RecordDialogCreation(
97 chrome::DialogIdentifier::SAFE_BROWSING_DOWNLOAD_FEEDBACK);
95 } 98 }
96 99
97 DownloadFeedbackDialogView::~DownloadFeedbackDialogView() {} 100 DownloadFeedbackDialogView::~DownloadFeedbackDialogView() {}
98 101
99 int DownloadFeedbackDialogView::GetDefaultDialogButton() const { 102 int DownloadFeedbackDialogView::GetDefaultDialogButton() const {
100 return ui::DIALOG_BUTTON_CANCEL; 103 return ui::DIALOG_BUTTON_CANCEL;
101 } 104 }
102 105
103 base::string16 DownloadFeedbackDialogView::GetDialogButtonLabel( 106 base::string16 DownloadFeedbackDialogView::GetDialogButtonLabel(
104 ui::DialogButton button) const { 107 ui::DialogButton button) const {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 WindowOpenDisposition disposition = 165 WindowOpenDisposition disposition =
163 ui::DispositionFromEventFlags(event_flags); 166 ui::DispositionFromEventFlags(event_flags);
164 content::OpenURLParams params( 167 content::OpenURLParams params(
165 GURL(l10n_util::GetStringUTF8(IDS_SAFE_BROWSING_PRIVACY_POLICY_URL)), 168 GURL(l10n_util::GetStringUTF8(IDS_SAFE_BROWSING_PRIVACY_POLICY_URL)),
166 content::Referrer(), disposition == WindowOpenDisposition::CURRENT_TAB 169 content::Referrer(), disposition == WindowOpenDisposition::CURRENT_TAB
167 ? WindowOpenDisposition::NEW_FOREGROUND_TAB 170 ? WindowOpenDisposition::NEW_FOREGROUND_TAB
168 : disposition, 171 : disposition,
169 ui::PAGE_TRANSITION_LINK, false); 172 ui::PAGE_TRANSITION_LINK, false);
170 navigator_->OpenURL(params); 173 navigator_->OpenURL(params);
171 } 174 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc ('k') | chrome/browser/ui/views/first_run_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698