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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/auto_signin_view_controller.mm

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 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 #include <algorithm> 5 #include <algorithm>
6 6
7 #import "chrome/browser/ui/cocoa/passwords/auto_signin_view_controller.h" 7 #import "chrome/browser/ui/cocoa/passwords/auto_signin_view_controller.h"
8 8
9 #include "base/mac/bind_objc_block.h" 9 #include "base/mac/bind_objc_block.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 11 matching lines...) Expand all
22 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
23 #include "ui/gfx/font_list.h" 23 #include "ui/gfx/font_list.h"
24 24
25 namespace { 25 namespace {
26 const int kAutoSigninToastTimeoutSeconds = 3; 26 const int kAutoSigninToastTimeoutSeconds = 3;
27 } // namespace 27 } // namespace
28 28
29 @interface AutoSigninViewController () { 29 @interface AutoSigninViewController () {
30 base::scoped_nsobject<CredentialItemButton> credentialView_; 30 base::scoped_nsobject<CredentialItemButton> credentialView_;
31 base::scoped_nsobject<AccountAvatarFetcherManager> avatarManager_; 31 base::scoped_nsobject<AccountAvatarFetcherManager> avatarManager_;
32 scoped_ptr<base::Timer> timer_; 32 std::unique_ptr<base::Timer> timer_;
33 } 33 }
34 - (instancetype) 34 - (instancetype)
35 initWithAvatarManager:(AccountAvatarFetcherManager*)avatarManager 35 initWithAvatarManager:(AccountAvatarFetcherManager*)avatarManager
36 delegate:(id<BasePasswordsContentViewDelegate>)delegate; 36 delegate:(id<BasePasswordsContentViewDelegate>)delegate;
37 @end 37 @end
38 38
39 @implementation AutoSigninViewController 39 @implementation AutoSigninViewController
40 40
41 - (instancetype)initWithDelegate: 41 - (instancetype)initWithDelegate:
42 (id<BasePasswordsContentViewDelegate>)delegate { 42 (id<BasePasswordsContentViewDelegate>)delegate {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 forView:credentialView_]; 83 forView:credentialView_];
84 } 84 }
85 [credentialView_ sizeToFit]; 85 [credentialView_ sizeToFit];
86 NSRect frame = [credentialView_ frame]; 86 NSRect frame = [credentialView_ frame];
87 frame.size.height += 2 * kVerticalAvatarMargin; 87 frame.size.height += 2 * kVerticalAvatarMargin;
88 [credentialView_ setFrame:frame]; 88 [credentialView_ setFrame:frame];
89 [self setView:credentialView_]; 89 [self setView:credentialView_];
90 } 90 }
91 91
92 @end 92 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698