| OLD | NEW |
| 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.h" | 7 #include "base/metrics/histogram.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/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "chrome/grit/chromium_strings.h" | 12 #include "chrome/grit/chromium_strings.h" |
| 13 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 14 #include "components/constrained_window/constrained_window_views.h" | 14 #include "components/constrained_window/constrained_window_views.h" |
| 15 #include "components/prefs/pref_service.h" | 15 #include "components/prefs/pref_service.h" |
| 16 #include "components/strings/grit/components_strings.h" |
| 16 #include "content/public/browser/page_navigator.h" | 17 #include "content/public/browser/page_navigator.h" |
| 17 #include "grit/components_strings.h" | |
| 18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
| 19 #include "ui/views/controls/link.h" | 19 #include "ui/views/controls/link.h" |
| 20 #include "ui/views/controls/message_box_view.h" | 20 #include "ui/views/controls/message_box_view.h" |
| 21 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
| 22 | 22 |
| 23 using content::OpenURLParams; | 23 using content::OpenURLParams; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 const void* const kDialogStatusKey = &kDialogStatusKey; | 27 const void* const kDialogStatusKey = &kDialogStatusKey; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 views::Link* source, int event_flags) { | 154 views::Link* source, int event_flags) { |
| 155 WindowOpenDisposition disposition = | 155 WindowOpenDisposition disposition = |
| 156 ui::DispositionFromEventFlags(event_flags); | 156 ui::DispositionFromEventFlags(event_flags); |
| 157 content::OpenURLParams params( | 157 content::OpenURLParams params( |
| 158 GURL(l10n_util::GetStringUTF8(IDS_SAFE_BROWSING_PRIVACY_POLICY_URL)), | 158 GURL(l10n_util::GetStringUTF8(IDS_SAFE_BROWSING_PRIVACY_POLICY_URL)), |
| 159 content::Referrer(), | 159 content::Referrer(), |
| 160 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, | 160 disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition, |
| 161 ui::PAGE_TRANSITION_LINK, false); | 161 ui::PAGE_TRANSITION_LINK, false); |
| 162 navigator_->OpenURL(params); | 162 navigator_->OpenURL(params); |
| 163 } | 163 } |
| OLD | NEW |