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

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

Issue 1922133002: Change 'const' -> 'constexpr' in cocoa/passwords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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"
11 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/chrome_style.h" 13 #include "chrome/browser/ui/chrome_style.h"
14 #import "chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h" 14 #import "chrome/browser/ui/cocoa/passwords/account_avatar_fetcher_manager.h"
15 #import "chrome/browser/ui/cocoa/passwords/credential_item_button.h" 15 #import "chrome/browser/ui/cocoa/passwords/credential_item_button.h"
16 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h" 16 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h"
17 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" 17 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
18 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" 18 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
19 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
20 #include "skia/ext/skia_utils_mac.h" 20 #include "skia/ext/skia_utils_mac.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
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 constexpr 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 std::unique_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;
(...skipping 46 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