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

Side by Side Diff: chrome/browser/ui/views/settings_reset_prompt_dialog.cc

Issue 2800773003: Settings reset prompt: add more UI metrics. (Closed)
Patch Set: Created 3 years, 8 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 #include "chrome/browser/ui/views/settings_reset_prompt_dialog.h" 5 #include "chrome/browser/ui/views/settings_reset_prompt_dialog.h"
6 6
7 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_controller.h" 7 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom pt_controller.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "components/constrained_window/constrained_window_views.h" 10 #include "components/constrained_window/constrained_window_views.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 bool SettingsResetPromptDialog::Cancel() { 109 bool SettingsResetPromptDialog::Cancel() {
110 if (!interaction_done_) { 110 if (!interaction_done_) {
111 interaction_done_ = true; 111 interaction_done_ = true;
112 controller_->Cancel(); 112 controller_->Cancel();
113 } 113 }
114 return true; 114 return true;
115 } 115 }
116 116
117 bool SettingsResetPromptDialog::Close() {
118 if (!interaction_done_) {
119 interaction_done_ = true;
120 controller_->Close();
121 }
122 return true;
123 }
124
117 // View overrides. 125 // View overrides.
118 126
119 gfx::Size SettingsResetPromptDialog::GetPreferredSize() const { 127 gfx::Size SettingsResetPromptDialog::GetPreferredSize() const {
120 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth)); 128 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth));
121 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698