Index: chrome/browser/ui/views/location_bar/origin_chip_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/origin_chip_view.cc b/chrome/browser/ui/views/location_bar/origin_chip_view.cc |
index 5dc5eecae35ad38d17e91a8a0723f28888f1c560..ddc6127ea19e6219f8c58ccf5ca3f42fcdb26b5b 100644 |
--- a/chrome/browser/ui/views/location_bar/origin_chip_view.cc |
+++ b/chrome/browser/ui/views/location_bar/origin_chip_view.cc |
@@ -150,7 +150,7 @@ OriginChipView::OriginChipView(LocationBarView* location_bar_view, |
scoped_refptr<SafeBrowsingService> sb_service = |
g_browser_process->safe_browsing_service(); |
// |sb_service| may be NULL in tests. |
- if (sb_service && sb_service->ui_manager()) |
+ if (sb_service.get() && sb_service->ui_manager().get()) |
sb_service->ui_manager()->AddObserver(this); |
SetFontList(font_list); |
@@ -182,7 +182,7 @@ OriginChipView::OriginChipView(LocationBarView* location_bar_view, |
OriginChipView::~OriginChipView() { |
scoped_refptr<SafeBrowsingService> sb_service = |
g_browser_process->safe_browsing_service(); |
- if (sb_service.get() && sb_service->ui_manager()) |
+ if (sb_service.get() && sb_service->ui_manager().get()) |
sb_service->ui_manager()->RemoveObserver(this); |
} |