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

Side by Side Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2951753002: Replace a DCHECK in BVC with an early return. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/browser_view_controller.h" 5 #import "ios/chrome/browser/ui/browser_view_controller.h"
6 6
7 #import <AssetsLibrary/AssetsLibrary.h> 7 #import <AssetsLibrary/AssetsLibrary.h>
8 #import <MobileCoreServices/MobileCoreServices.h> 8 #import <MobileCoreServices/MobileCoreServices.h>
9 #import <PassKit/PassKit.h> 9 #import <PassKit/PassKit.h>
10 #import <Photos/Photos.h> 10 #import <Photos/Photos.h>
(...skipping 4386 matching lines...) Expand 10 before | Expand all | Expand 10 after
4397 __weak BrowserViewController* weakSelf = self; 4397 __weak BrowserViewController* weakSelf = self;
4398 Tab* currentTab = [_model currentTab]; 4398 Tab* currentTab = [_model currentTab];
4399 if (currentTab) { 4399 if (currentTab) {
4400 FindTabHelper::FromWebState(currentTab.webState)->StopFinding(^{ 4400 FindTabHelper::FromWebState(currentTab.webState)->StopFinding(^{
4401 [weakSelf updateFindBar:NO shouldFocus:NO]; 4401 [weakSelf updateFindBar:NO shouldFocus:NO];
4402 }); 4402 });
4403 } 4403 }
4404 } 4404 }
4405 4405
4406 - (void)updateFindBar:(BOOL)initialUpdate shouldFocus:(BOOL)shouldFocus { 4406 - (void)updateFindBar:(BOOL)initialUpdate shouldFocus:(BOOL)shouldFocus {
4407 DCHECK([_model currentTab]); 4407 if (![_model currentTab]) {
rohitrao (ping after 24h) 2017/06/20 14:02:44 Consider adding a link to the crbug and explaining
stkhapugin 2017/06/20 14:09:42 Done.
4408 return;
4409 }
4408 auto* helper = FindTabHelper::FromWebState([_model currentTab].webState); 4410 auto* helper = FindTabHelper::FromWebState([_model currentTab].webState);
4409 if (helper && helper->IsFindUIActive()) { 4411 if (helper && helper->IsFindUIActive()) {
4410 if (initialUpdate && !_isOffTheRecord) { 4412 if (initialUpdate && !_isOffTheRecord) {
4411 helper->RestoreSearchTerm(); 4413 helper->RestoreSearchTerm();
4412 } 4414 }
4413 4415
4414 [self setFramesForHeaders:[self headerViews] 4416 [self setFramesForHeaders:[self headerViews]
4415 atOffset:[self currentHeaderOffset]]; 4417 atOffset:[self currentHeaderOffset]];
4416 [_findBarController updateView:helper->GetFindResult() 4418 [_findBarController updateView:helper->GetFindResult()
4417 initialUpdate:initialUpdate 4419 initialUpdate:initialUpdate
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
5240 5242
5241 - (UIView*)voiceSearchButton { 5243 - (UIView*)voiceSearchButton {
5242 return _voiceSearchButton; 5244 return _voiceSearchButton;
5243 } 5245 }
5244 5246
5245 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner { 5247 - (id<LogoAnimationControllerOwner>)logoAnimationControllerOwner {
5246 return [self currentLogoAnimationControllerOwner]; 5248 return [self currentLogoAnimationControllerOwner];
5247 } 5249 }
5248 5250
5249 @end 5251 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698