| 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/safe_browsing/chrome_cleaner/srt_global_error_win.h" | 5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_global_error_win.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 130 } |
| 131 | 131 |
| 132 void SRTGlobalError::ExecuteMenuItem(Browser* browser) { | 132 void SRTGlobalError::ExecuteMenuItem(Browser* browser) { |
| 133 RecordSRTPromptHistogram(SRT_PROMPT_SHOWN_FROM_MENU); | 133 RecordSRTPromptHistogram(SRT_PROMPT_SHOWN_FROM_MENU); |
| 134 bubble_shown_from_menu_ = true; | 134 bubble_shown_from_menu_ = true; |
| 135 ShowBubbleView(browser); | 135 ShowBubbleView(browser); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void SRTGlobalError::ShowBubbleView(Browser* browser) { | 138 void SRTGlobalError::ShowBubbleView(Browser* browser) { |
| 139 RecordSRTPromptHistogram(SRT_PROMPT_SHOWN); | 139 RecordSRTPromptHistogram(SRT_PROMPT_SHOWN); |
| 140 RecordPromptShownHistogram(); |
| 140 GlobalErrorWithStandardBubble::ShowBubbleView(browser); | 141 GlobalErrorWithStandardBubble::ShowBubbleView(browser); |
| 141 } | 142 } |
| 142 | 143 |
| 143 bool SRTGlobalError::ShouldShowCloseButton() const { | 144 bool SRTGlobalError::ShouldShowCloseButton() const { |
| 144 return true; | 145 return true; |
| 145 } | 146 } |
| 146 | 147 |
| 147 base::string16 SRTGlobalError::GetBubbleViewTitle() { | 148 base::string16 SRTGlobalError::GetBubbleViewTitle() { |
| 148 return l10n_util::GetStringUTF16(IDS_SRT_BUBBLE_TITLE); | 149 return l10n_util::GetStringUTF16(IDS_SRT_BUBBLE_TITLE); |
| 149 } | 150 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 void SRTGlobalError::OnUserinteractionDone() { | 260 void SRTGlobalError::OnUserinteractionDone() { |
| 260 DCHECK(interacted_); | 261 DCHECK(interacted_); |
| 261 // Once the user interacted with the bubble, we can forget about any pending | 262 // Once the user interacted with the bubble, we can forget about any pending |
| 262 // prompt. | 263 // prompt. |
| 263 g_browser_process->local_state()->SetBoolean(prefs::kSwReporterPendingPrompt, | 264 g_browser_process->local_state()->SetBoolean(prefs::kSwReporterPendingPrompt, |
| 264 false); | 265 false); |
| 265 delete this; | 266 delete this; |
| 266 } | 267 } |
| 267 | 268 |
| 268 } // namespace safe_browsing | 269 } // namespace safe_browsing |
| OLD | NEW |