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

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

Issue 2816383002: Remove non-const version of GetDefaultSearchProvider() and make all callers call the const version (Closed)
Patch Set: Fix instant extended interactive ui test for calling the const version of GetDefaultSearchProvider() 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 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 #import "ios/chrome/browser/ui/ntp/google_landing_controller.h" 5 #import "ios/chrome/browser/ui/ntp/google_landing_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #import "base/ios/weak_nsobject.h" 10 #import "base/ios/weak_nsobject.h"
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 - (void)reparentToolbarController { 585 - (void)reparentToolbarController {
586 [_headerView reparentToolbarController]; 586 [_headerView reparentToolbarController];
587 } 587 }
588 588
589 - (BOOL)isShowingLogo { 589 - (BOOL)isShowingLogo {
590 return [_doodleController isShowingLogo]; 590 return [_doodleController isShowingLogo];
591 } 591 }
592 592
593 - (void)updateLogoAndFakeboxDisplay { 593 - (void)updateLogoAndFakeboxDisplay {
594 BOOL showLogo = NO; 594 BOOL showLogo = NO;
595 TemplateURL* defaultURL = _templateURLService->GetDefaultSearchProvider(); 595 const TemplateURL* defaultURL =
596 _templateURLService->GetDefaultSearchProvider();
596 if (defaultURL) { 597 if (defaultURL) {
597 showLogo = 598 showLogo =
598 defaultURL->GetEngineType(_templateURLService->search_terms_data()) == 599 defaultURL->GetEngineType(_templateURLService->search_terms_data()) ==
599 SEARCH_ENGINE_GOOGLE; 600 SEARCH_ENGINE_GOOGLE;
600 } 601 }
601 602
602 if (self.showingLogo != showLogo) { 603 if (self.showingLogo != showLogo) {
603 [_doodleController setShowingLogo:showLogo]; 604 [_doodleController setShowingLogo:showLogo];
604 if (_viewLoaded) { 605 if (_viewLoaded) {
605 [self updateSubviewFrames]; 606 [self updateSubviewFrames];
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 if (!view) { 1707 if (!view) {
1707 return nil; 1708 return nil;
1708 } 1709 }
1709 if ([view isKindOfClass:aClass]) { 1710 if ([view isKindOfClass:aClass]) {
1710 return view; 1711 return view;
1711 } 1712 }
1712 return [self nearestAncestorOfView:[view superview] withClass:aClass]; 1713 return [self nearestAncestorOfView:[view superview] withClass:aClass];
1713 } 1714 }
1714 1715
1715 @end 1716 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698