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

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

Issue 2739513002: Settings reset prompt: add UMA metrics reporting. (Closed)
Patch Set: Adds histograms to log what is reset when prompt is accepted Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/time/time.h"
13 #include "ui/gfx/range/range.h" 14 #include "ui/gfx/range/range.h"
14 15
15 class Browser; 16 class Browser;
16 17
17 namespace safe_browsing { 18 namespace safe_browsing {
18 19
19 class SettingsResetPromptModel; 20 class SettingsResetPromptModel;
20 21
21 // The |SettingsResetPromptController| class is responsible for providing the 22 // The |SettingsResetPromptController| class is responsible for providing the
22 // text that will be displayed in the settings reset dialog. The controller's 23 // text that will be displayed in the settings reset dialog. The controller's
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void InitMainText(); 57 void InitMainText();
57 // Function to be called sometime after |Accept()| or |Cancel()| has been 58 // Function to be called sometime after |Accept()| or |Cancel()| has been
58 // called to perform any final tasks (such as metrcis reporting) and delete 59 // called to perform any final tasks (such as metrcis reporting) and delete
59 // this object. 60 // this object.
60 void OnInteractionDone(); 61 void OnInteractionDone();
61 62
62 std::unique_ptr<SettingsResetPromptModel> model_; 63 std::unique_ptr<SettingsResetPromptModel> model_;
63 base::string16 main_text_; 64 base::string16 main_text_;
64 gfx::Range main_text_url_range_; 65 gfx::Range main_text_url_range_;
65 66
67 // Used for metrics reporting.
68 base::Time time_dialog_shown_;
69
66 DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptController); 70 DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptController);
67 }; 71 };
68 72
69 // Function to be called after startup in order to display the settings reset 73 // Function to be called after startup in order to display the settings reset
70 // prompt. The function will figure out if a prompt is needed, and if so, show 74 // prompt. The function will figure out if a prompt is needed, and if so, show
71 // the dialog after a delay as determined by the |kSettingsResetPrompt| 75 // the dialog after a delay as determined by the |kSettingsResetPrompt|
72 // feature parameters. 76 // feature parameters.
73 void MaybeShowSettingsResetPromptWithDelay(); 77 void MaybeShowSettingsResetPromptWithDelay();
74 78
75 } // namespace safe_browsing 79 } // namespace safe_browsing
76 80
77 #endif // CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PRO MPT_CONTROLLER_H_ 81 #endif // CHROME_BROWSER_SAFE_BROWSING_SETTINGS_RESET_PROMPT_SETTINGS_RESET_PRO MPT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698