GN: Fixes for Chromium builds.

When building WebRTC from a Chromium checkout (i.e. with
https://codereview.chromium.org/321313006/ applied) GN
cannot execute successfully.

This CL fixes:
- include path for video_processing module's SSE2 target.
- NSS/SSL targets

BUG=3441
TEST=
Passing WebRTC GN trybots.
Passing build from a Chromium checkout with https://codereview.chromium.org/321313006 applied and src/third_party/webrtc symlinked to the WebRTC checkout with this CL:
gn gen out/Default --args="clang_use_chrome_plugins=false" && ninja -C out/Default
gn gen out/Default --args="os=\"android\" cpu_arch=\"arm\"  clang_use_chrome_plugins=false" && ninja -C out/Default

R=brettw@chromium.org

Review URL: https://webrtc-codereview.appspot.com/21179005

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6921 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 32bc556..68c8f45 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -86,41 +86,24 @@
   ]
 }
 
-config("linux_system_ssl_config") {
-  visibility = ":*"  # Only targets in this file can depend on this.
+if (is_linux && !build_with_chromium) {
+  # Provides the same functionality as the //crypto:platform target, which
+  # WebRTC cannot use as we don't sync src/crypto from Chromium.
+  group("linux_system_ssl") {
+    if (use_openssl) {
+      deps = [ "//third_party/boringssl" ]
+    } else {
+      deps = [ "//net/third_party/nss/ssl:libssl" ]
 
-  # TODO(kjellander): Find out how to convert GYP include_dirs+ (i.e. insert
-  # first in the include path?).
-  include_dirs = [ "//net/third_party/nss/ssl" ]
-
-  configs = [ "//third_party/nss:system_nss_no_ssl_config" ]
-}
-
-# Provides the same functionality as the build/linux/system.gyp:ssl GYP target.
-# This cannot be in build/linux/BUILD.gn since targets in build/ are not allowed
-# to depend on targets outside of it. This could be replaced by the Chromium
-# //crypto:platform target, but as WebRTC currently don't sync src/crypto from
-# Chromium, it is not possible today.
-config("linux_system_ssl") {
-  if (use_openssl) {
-    deps = [ "//third_party/boringssl" ]
-  } else {
-    deps = [ "//net/third_party/nss/ssl:libssl" ]
-
-    direct_dependent_configs = [
-      ":linux_system_ssl_config",
-    ]
-
-    if (is_clang) {
-      cflags = [
-        # There is a broken header guard in /usr/include/nss/secmod.h:
-        # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
-        "-Wno-header-guard",
+      direct_dependent_configs = [
+        "//net/third_party/nss/ssl:ssl_config",
+        "//third_party/nss:system_nss_no_ssl_config",
       ]
     }
   }
 }
 
+
 static_library("webrtc_base") {
   cflags = []
   cflags_cc = []
@@ -587,6 +570,10 @@
   }
 
   if (is_posix && !is_mac && !is_ios && !is_android) {
-    configs += [ ":linux_system_ssl" ]
+    if (build_with_chromium) {
+      deps += [ "//crypto:platform" ]
+    } else {
+      deps += [ ":linux_system_ssl" ]
+    }
   }
 }
diff --git a/modules/video_processing/BUILD.gn b/modules/video_processing/BUILD.gn
index f9412f9..59bde18 100644
--- a/modules/video_processing/BUILD.gn
+++ b/modules/video_processing/BUILD.gn
@@ -49,6 +49,11 @@
 if (build_video_processing_sse2) {
   source_set("video_processing_sse2") {
     sources = [ "main/source/content_analysis_sse2.cc" ]
+
+    configs += [
+      "../..:common_inherited_config",
+    ]
+
     if (is_posix) {
       cflags = [ "-msse2" ]
     }