Reland "Enable `gn check` on //chrome/browser."
This is a reland of 93d899e275ce1bea83e4abcca93f26e6aaa64a64
OCL incorrectly added a dep on telemetry in official build.
[email protected],[email protected],[email protected],[email protected]
Original change's description:
> Enable `gn check` on //chrome/browser.
>
> Changes are:
> - adding deps when missing.
> - adding "nogncheck" when needed (see below explanation).
> - deleting nonexistent files from sources.
> - new target :net_dns_access for files that depend on
> //net/dns:host_resolver (which has restricted visibility).
> Alternative: could open visibility to all of //chrome/browser instead
> of adding a new target that has visibility.
> - moving //c/b:test_support sources to //c/b/chromeos:test_support or
> //c/test:test_support when they depended on headers there (cannot
> add a dependency, there is a cycle).
> - moving includes to conditional sections when they are used only in
> conditional sections (where it caused deps issues).
> - removing unused includes of test code from non-test code.
> - merging sections in //c/b/BUILD.gn that had the same if() conditions.
> Alternative: revert these changes, they are cosmetic.
> - adding some asserts/conditional blocks in build files that only work
> under those conditions.
>
> "gn check" does not understand #if statements in cc/h files so it
> complains about missing deps in configurations where those deps were
> never actually included. "nogncheck" has been added to the include lines
> to suppress these spurious errors where necessary (sometimes it is not
> necessary because the include is used outside of #if statements in other
> files).
>
> Bug: 898837, 1125897
> Change-Id: I77e7dd3780fb93edb2b555a82b681a870990b496
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2383400
> Reviewed-by: Dominick Ng <[email protected]>
> Reviewed-by: Eric Orth <[email protected]>
> Reviewed-by: Colin Blundell <[email protected]>
> Reviewed-by: Dirk Pranke <[email protected]>
> Commit-Queue: Glen Robertson <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#807321}
Bug: 898837
Bug: 1125897
Change-Id: If1dc6009b640c0b6ae33b1455b6ccf27c1cf274b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2413427
Reviewed-by: Glen Robertson <[email protected]>
Commit-Queue: Glen Robertson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#807360}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index c5734a3..e2f18aa 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -222,7 +222,7 @@
#include "chrome/browser/first_run/android/first_run_prefs.h"
#include "chrome/browser/media/android/cdm/media_drm_origin_id_manager.h"
#include "chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h"
-#include "components/cdm/browser/media_drm_storage_impl.h"
+#include "components/cdm/browser/media_drm_storage_impl.h" // nogncheck crbug.com/1125897
#include "components/feed/buildflags.h"
#include "components/feed/core/shared_prefs/pref_names.h"
#include "components/games/core/games_prefs.h"