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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1456053002: Add Nullity check for instant service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 9d19ce3b25a624e5f69cff4df39210adeb33c9f4..c826d3dc976344dadd7d34ecc4dec1f0e4d61042 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1274,8 +1274,10 @@ const char* LocationBarView::GetClassName() const {
}
void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
- InstantServiceFactory::GetForProfile(profile())->OnOmniboxStartMarginChanged(
- bounds().x());
+ InstantService* instant_service =
+ InstantServiceFactory::GetForProfile(profile());
+ if (instant_service)
+ instant_service->OnOmniboxStartMarginChanged(bounds().x());
OmniboxPopupView* popup = omnibox_view_->model()->popup_model()->view();
if (popup->IsOpen())
« 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