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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // True if the save bubble should display the warm welcome for Google Smart 104 // True if the save bubble should display the warm welcome for Google Smart
105 // Lock. 105 // Lock.
106 bool ShouldShowGoogleSmartLockWelcome() const; 106 bool ShouldShowGoogleSmartLockWelcome() const;
107 107
108 #if defined(UNIT_TEST) 108 #if defined(UNIT_TEST)
109 // Gets the reason the bubble was dismissed. 109 // Gets the reason the bubble was dismissed.
110 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { 110 password_manager::metrics_util::UIDismissalReason dismissal_reason() const {
111 return dismissal_reason_; 111 return dismissal_reason_;
112 } 112 }
113 113
114 void set_clock(scoped_ptr<base::Clock> clock) { clock_ = std::move(clock); } 114 void set_clock(std::unique_ptr<base::Clock> clock) {
115 clock_ = std::move(clock);
116 }
115 #endif 117 #endif
116 118
117 private: 119 private:
118 enum UserBehaviorOnUpdateBubble { 120 enum UserBehaviorOnUpdateBubble {
119 UPDATE_CLICKED, 121 UPDATE_CLICKED,
120 NOPE_CLICKED, 122 NOPE_CLICKED,
121 NO_INTERACTION 123 NO_INTERACTION
122 }; 124 };
123 // Updates |title_| and |title_brand_link_range_| for the 125 // Updates |title_| and |title_brand_link_range_| for the
124 // PENDING_PASSWORD_STATE. 126 // PENDING_PASSWORD_STATE.
(...skipping 17 matching lines...) Expand all
142 gfx::Range save_confirmation_link_range_; 144 gfx::Range save_confirmation_link_range_;
143 password_manager::metrics_util::UIDisplayDisposition display_disposition_; 145 password_manager::metrics_util::UIDisplayDisposition display_disposition_;
144 password_manager::metrics_util::UIDismissalReason dismissal_reason_; 146 password_manager::metrics_util::UIDismissalReason dismissal_reason_;
145 password_manager::metrics_util::UpdatePasswordSubmissionEvent 147 password_manager::metrics_util::UpdatePasswordSubmissionEvent
146 update_password_submission_event_; 148 update_password_submission_event_;
147 149
148 // Current statistics for the save password bubble; 150 // Current statistics for the save password bubble;
149 password_manager::InteractionsStats interaction_stats_; 151 password_manager::InteractionsStats interaction_stats_;
150 152
151 // Used to retrieve the current time, in base::Time units. 153 // Used to retrieve the current time, in base::Time units.
152 scoped_ptr<base::Clock> clock_; 154 std::unique_ptr<base::Clock> clock_;
153 155
154 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); 156 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
155 }; 157 };
156 158
157 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 159 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698