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

Side by Side Diff: chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.h

Issue 2971183002: Enforces order for settings reset (Closed)
Patch Set: Add browser test for dependency Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PROMPT _CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PROMPT _CONTROLLER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PROMPT _CONTROLLER_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PROMPT _CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptController); 77 DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptController);
78 }; 78 };
79 79
80 // Function to be called after startup in order to display the settings reset 80 // Function to be called after startup in order to display the settings reset
81 // prompt. The function will figure out if a prompt is needed, and if so, show 81 // prompt. The function will figure out if a prompt is needed, and if so, show
82 // the dialog after a delay as determined by the |kSettingsResetPrompt| 82 // the dialog after a delay as determined by the |kSettingsResetPrompt|
83 // feature parameters. 83 // feature parameters.
84 void MaybeShowSettingsResetPromptWithDelay(); 84 void MaybeShowSettingsResetPromptWithDelay();
85 85
86 // Delegate for MaybeShowSettingsResetPromptWithDelay() that can be overriden
87 // by tests that only want to check if the flow for the settings reset prompt
88 // will be initiated.
89 class SettingsResetPromptDelegate {
90 public:
91 SettingsResetPromptDelegate();
92 virtual ~SettingsResetPromptDelegate();
93
94 virtual void ShowSettingsResetPromptWithDelay() const = 0;
95
96 private:
97 DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptDelegate);
98 };
99
100 // Sets the global SettingsResetPromptDelegate, usually for testing.
101 void SetSettingsResetPromptDelegate(SettingsResetPromptDelegate* delegate);
102
86 } // namespace safe_browsing 103 } // namespace safe_browsing
87 104
88 #endif // CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PRO MPT_CONTROLLER_H_ 105 #endif // CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PRO MPT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698