| 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "chrome/browser/safe_browsing/srt_field_trial_win.h" |
| 12 #include "chrome/browser/ui/global_error/global_error.h" | 13 #include "chrome/browser/ui/global_error/global_error.h" |
| 13 | 14 |
| 14 class GlobalErrorService; | 15 class GlobalErrorService; |
| 15 | 16 |
| 16 namespace safe_browsing { | 17 namespace safe_browsing { |
| 17 | 18 |
| 18 // Encapsulates UI-related functionality for the software removal tool (SRT) | 19 // Encapsulates UI-related functionality for the software removal tool (SRT) |
| 19 // prompt. The UI consists of two parts: (1.) the profile reset (pop-up) bubble, | 20 // prompt. The UI consists of two parts: (1.) the profile reset (pop-up) bubble, |
| 20 // and (2.) a menu item in the wrench menu (provided by being a GlobalError). | 21 // and (2.) a menu item in the wrench menu (provided by being a GlobalError). |
| 21 class SRTGlobalError : public GlobalErrorWithStandardBubble { | 22 class SRTGlobalError : public GlobalErrorWithStandardBubble { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 52 bool ShouldCloseOnDeactivate() const override; | 53 bool ShouldCloseOnDeactivate() const override; |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 // Executes the SRT if the executable is present. | 56 // Executes the SRT if the executable is present. |
| 56 void MaybeExecuteSRT(); | 57 void MaybeExecuteSRT(); |
| 57 | 58 |
| 58 // Falls back to a navigation to the download page when we failed to | 59 // Falls back to a navigation to the download page when we failed to |
| 59 // download and execute the SRT. | 60 // download and execute the SRT. |
| 60 void FallbackToDownloadPage(); | 61 void FallbackToDownloadPage(); |
| 61 | 62 |
| 63 // Called when user interaction has started. |
| 64 void OnUserinteractionStarted(SRTPromptHistogramValue histogram_value); |
| 65 |
| 62 // Called when user interaction is done. | 66 // Called when user interaction is done. |
| 63 void OnUserinteractionDone(); | 67 void OnUserinteractionDone(); |
| 64 | 68 |
| 65 // Used to dismiss the GlobalError, then set to NULL. | 69 // Used to dismiss the GlobalError, then set to NULL. |
| 66 GlobalErrorService* global_error_service_; | 70 GlobalErrorService* global_error_service_; |
| 67 | 71 |
| 68 // The path to the downloaded executable. | 72 // The path to the downloaded executable. |
| 69 base::FilePath downloaded_path_; | 73 base::FilePath downloaded_path_; |
| 70 | 74 |
| 71 // Identifies whether the Dismiss button should be shown or not. | 75 // Identifies whether the Dismiss button should be shown or not. |
| 72 bool show_dismiss_button_ = false; | 76 bool show_dismiss_button_ = false; |
| 73 | 77 |
| 74 // Identifies whether the user interacted with the bubble buttons or not. | 78 // Identifies whether the user interacted with the bubble buttons or not. |
| 75 bool interacted_ = false; | 79 bool interacted_ = false; |
| 76 | 80 |
| 77 DISALLOW_COPY_AND_ASSIGN(SRTGlobalError); | 81 DISALLOW_COPY_AND_ASSIGN(SRTGlobalError); |
| 78 }; | 82 }; |
| 79 | 83 |
| 80 } // namespace safe_browsing | 84 } // namespace safe_browsing |
| 81 | 85 |
| 82 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ | 86 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_GLOBAL_ERROR_WIN_H_ |
| OLD | NEW |