commit | 30e6f82d17b9d1c136cd6177c53a5ec86e0ab740 | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Mon Jun 04 14:16:42 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Jun 04 14:16:42 2018 |
tree | d5c37a61a19711305c61bd7be7243740c55b86b8 | |
parent | a6c69c8113a7113cc6b4a4f8de3291095d717e40 [diff] |
OmniboxViewViews: Do not initialize ScopedObservers in the class declaration See also: https://chromium-review.googlesource.com/1082316, which fixes the same issue elsewhere. GCC requires a full declaration for ScopedObserver's types to be present when it is initialized in a class declaration: ../../base/scoped_observer.h: In instantiation of ‘void ScopedObserver<Source, Observer>::RemoveAll() [with Source = TemplateURLService; Observer = TemplateURLServiceObserver]’: ../../base/scoped_observer.h:26:14: required from ‘ScopedObserver<Source, Observer>::~ScopedObserver() [with Source = TemplateURLService; Observer = TemplateURLServiceObserver]’ ../../chrome/browser/ui/views/omnibox/omnibox_view_views.h:339:49: required from here ../../base/scoped_observer.h:45:20: error: invalid use of incomplete type ‘class TemplateURLService’ sources_[i]->RemoveObserver(observer_); ~~~~~~~~~~~~~^~~~~~~~~~~~~~ In file included from ../../chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc:31:0: ../../chrome/browser/search/search.h:12:7: note: forward declaration of ‘class TemplateURLService’ class TemplateURLService; ^~~~~~~~~~~~~~~~~~ Fix it by moving the initialization to the class' member initialization list. Bug: 819294 Change-Id: I00d1a39254681b05bcfa4df56bc0b36f6fe318e4 Reviewed-on: https://chromium-review.googlesource.com/1084596 Reviewed-by: Michael Wasserman <msw@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#564082}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .