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

Side by Side Diff: ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller.mm

Issue 2942923002: Implementing sign-in promo histograms for bookmark (Closed)
Patch Set: Renaming histograms Created 3 years, 5 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 #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller .h" 5 #import "ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_view_controller .h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/user_metrics.h" 10 #include "base/metrics/user_metrics.h"
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 subview = [[SignedInSyncOffView alloc] initWithFrame:CGRectZero 815 subview = [[SignedInSyncOffView alloc] initWithFrame:CGRectZero
816 browserState:_browserState]; 816 browserState:_browserState];
817 [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; 817 [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
818 break; 818 break;
819 case CELL_OTHER_DEVICES_SIGNED_IN_SYNC_ON_NO_SESSIONS: 819 case CELL_OTHER_DEVICES_SIGNED_IN_SYNC_ON_NO_SESSIONS:
820 subview = [[SignedInSyncOnNoSessionsView alloc] initWithFrame:CGRectZero]; 820 subview = [[SignedInSyncOnNoSessionsView alloc] initWithFrame:CGRectZero];
821 [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; 821 [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
822 break; 822 break;
823 case CELL_OTHER_DEVICES_SIGNIN_PROMO: { 823 case CELL_OTHER_DEVICES_SIGNIN_PROMO: {
824 if (!_signinPromoViewMediator) { 824 if (!_signinPromoViewMediator) {
825 _signinPromoViewMediator = [[SigninPromoViewMediator alloc] init]; 825 _signinPromoViewMediator = [[SigninPromoViewMediator alloc]
826 initWithBrowserState:_browserState];
826 _signinPromoViewMediator.consumer = self; 827 _signinPromoViewMediator.consumer = self;
827 _signinPromoViewMediator.accessPoint = 828 _signinPromoViewMediator.accessPoint =
828 signin_metrics::AccessPoint::ACCESS_POINT_RECENT_TABS; 829 signin_metrics::AccessPoint::ACCESS_POINT_RECENT_TABS;
829 } 830 }
830 contentViewTopMargin = kSigninPromoViewTopMargin; 831 contentViewTopMargin = kSigninPromoViewTopMargin;
831 SigninPromoView* signinPromoView = 832 SigninPromoView* signinPromoView =
832 [[SigninPromoView alloc] initWithFrame:CGRectZero]; 833 [[SigninPromoView alloc] initWithFrame:CGRectZero];
833 signinPromoView.delegate = _signinPromoViewMediator; 834 signinPromoView.delegate = _signinPromoViewMediator;
834 signinPromoView.textLabel.text = 835 signinPromoView.textLabel.text =
835 l10n_util::GetNSString(IDS_IOS_SIGNIN_PROMO_RECENT_TABS); 836 l10n_util::GetNSString(IDS_IOS_SIGNIN_PROMO_RECENT_TABS);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 UITableViewCell* cell = [self.tableView cellForRowAtIndexPath:indexPath]; 1032 UITableViewCell* cell = [self.tableView cellForRowAtIndexPath:indexPath];
1032 NSArray<UIView*>* contentViews = cell.contentView.subviews; 1033 NSArray<UIView*>* contentViews = cell.contentView.subviews;
1033 DCHECK(contentViews.count == 1); 1034 DCHECK(contentViews.count == 1);
1034 UIView* subview = contentViews[0]; 1035 UIView* subview = contentViews[0];
1035 DCHECK([subview isKindOfClass:[SigninPromoView class]]); 1036 DCHECK([subview isKindOfClass:[SigninPromoView class]]);
1036 SigninPromoView* signinPromoView = (SigninPromoView*)subview; 1037 SigninPromoView* signinPromoView = (SigninPromoView*)subview;
1037 [configurator configureSigninPromoView:signinPromoView]; 1038 [configurator configureSigninPromoView:signinPromoView];
1038 } 1039 }
1039 1040
1040 @end 1041 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698