Skip to content

Commit

Permalink
Remove references to extensions from //components/guest_view/.
Browse files Browse the repository at this point in the history
We had an assert(enable_extensions) in //components/guest_view/ to
prevent the accidental building of GuestViews on mobile, since
extensions are currently the only thing using GuestViews. However,
referencing extensions here violates layering.

This modifies the assert to not reference extensions.

BUG=726694

Review-Url: https://codereview.chromium.org/2907863002
Cr-Commit-Position: refs/heads/master@{#475554}
  • Loading branch information
kjmcnee authored and Commit Bot committed May 30, 2017
1 parent 2928b5d commit f0a4990
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
9 changes: 4 additions & 5 deletions components/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import("//build/config/chrome_build.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//extensions/features/features.gni")
import("//printing/features/features.gni")
import("//rlz/features/features.gni")
import("//testing/test.gni")
Expand Down Expand Up @@ -161,10 +160,6 @@ test("components_unittests") {
deps += [ "//components/nacl/browser:unit_tests" ]
}

if (enable_extensions) {
deps += [ "//components/guest_view/browser:unit_tests" ]
}

if (is_ios) {
deps += [
"//components/image_fetcher/ios:unit_tests",
Expand Down Expand Up @@ -281,6 +276,10 @@ test("components_unittests") {
deps += [
"//components/cryptauth:unit_tests",
"//components/feedback:unit_tests",

# See comment in components/guest_view/browser/BUILD.gn for why
# guest_view is currently non-mobile.
"//components/guest_view/browser:unit_tests",
"//components/proximity_auth:unit_tests",
"//components/storage_monitor:unit_tests",
"//components/web_modal:unit_tests",
Expand Down
8 changes: 5 additions & 3 deletions components/guest_view/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//extensions/features/features.gni")

assert(enable_extensions)
# Currently, GuestViews are only used by extensions, so we have this
# assert to prevent the accidental building of GuestViews on mobile
# platforms. If you're now using GuestViews on mobile, go ahead and
# remove this assert.
assert(!is_android && !is_ios)

static_library("browser") {
output_name = "guest_view_browser"
Expand Down
8 changes: 5 additions & 3 deletions components/guest_view/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//extensions/features/features.gni")

assert(enable_extensions)
# Currently, GuestViews are only used by extensions, so we have this
# assert to prevent the accidental building of GuestViews on mobile
# platforms. If you're now using GuestViews on mobile, go ahead and
# remove this assert.
assert(!is_android && !is_ios)

static_library("renderer") {
sources = [
Expand Down

0 comments on commit f0a4990

Please sign in to comment.