commit | aef671d92bd4cd42b0fb562c73474775e4013e0e | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Thu Nov 08 17:40:44 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Nov 08 17:40:44 2018 |
tree | 8402ad2cab562f665d1fa312aaac025aa89441c4 | |
parent | 7935975eafaa43da7ad820ff7be7bfd700cb6f05 [diff] |
Put a bluetooth enum in an enum class to shadowing errors A bluetooth enum was putting some common names like "SUCCESS", "UNKNOWN" and "FAILED" in the content namespace. A recent clang (I think) added new warnings when these got got shadowed by other uses of the names. See full error below. This enum was always intended to be in an enum class judging from how it's used, so just use enum class to avoid further clashes. This primarily affected jumbo builds but could happen to any build which happened to include two conflicting headers in the same file. ../../content/browser/histogram_synchronizer.h:54:5: error: declaration shadows a variable in namespace 'content' [-Werror,-Wshadow] UNKNOWN, ^ ../../content/browser/bluetooth/bluetooth_metrics.h:228:3: note: previous declaration is here UNKNOWN = 5, ^ In file included from gen/content/browser/browser_jumbo_1.cc:170: In file included from ./../../content/browser/devtools/devtools_instrumentation.cc:16: ../../content/browser/frame_host/navigation_request.h:68:5: error: declaration shadows a variable in namespace 'content' [-Werror,-Wshadow] FAILED, ^ ../../content/browser/bluetooth/bluetooth_metrics.h:229:3: note: previous declaration is here FAILED = 6, ^ In file included from gen/content/browser/browser_jumbo_1.cc:247: In file included from ./../../content/browser/download/drag_download_file.cc:5: ../../content/browser/download/drag_download_file.h:53:37: error: declaration shadows a variable in namespace 'content' [-Werror,-Wshadow] enum State {INITIALIZED, STARTED, SUCCESS, FAILURE}; ^ ../../content/browser/bluetooth/bluetooth_metrics.h:223:3: note: previous declaration is here SUCCESS = 0, ^ TBR=jyasskin@chromium.org Change-Id: I2f35c1c11262e4f071cf1d64348c9bc30c76351b Reviewed-on: https://chromium-review.googlesource.com/c/1326507 Reviewed-by: Daniel Bratell <bratell@opera.com> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#606520}
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 .