Introduce GN config files.

Also pulls necessary Chromium dependencies.
Chromium will be not pulled from HEAD due to possibility of breaking
changes introduced in the Chromium tree. DEPS will be rolled manually.

BUG=
R=ftirelo@chromium.org

Review-Url: https://codereview.chromium.org/2693423007 .
diff --git a/.gitignore b/.gitignore
index d08a104..6dc5b77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,7 +51,13 @@
 /base
 /build
 /buildtools
+/build_overrides
 /testing
 /tools
 # Third party folders we pull in from DEPS
-/third_party/protobuf
\ No newline at end of file
+/third_party/ced
+/third_party/icu
+/third_party/libxml
+/third_party/modp_b64
+/third_party/protobuf
+/third_party/zlib
\ No newline at end of file
diff --git a/.gn b/.gn
new file mode 100644
index 0000000..6242679
--- /dev/null
+++ b/.gn
@@ -0,0 +1,13 @@
+# Copyright 2017 Google Inc. All Rights Reserved.
+
+# This file is used by the GN meta build system to find the root of the source
+# tree and to set startup options. For documentation on the values set in this
+# file, run "gn help dotfile" at the command line.
+
+# The location of the build configuration file.
+buildconfig = "//build/config/BUILDCONFIG.gn"
+
+# The secondary source root is a parallel directory tree where
+# GN build files are placed when they can not be placed directly
+# in the source tree, e.g. for third party source trees.
+secondary_source = "//build/secondary/"
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000..703f20b
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,16 @@
+# Copyright 2017 The Chromium Authors. All Rights Reserved.
+
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This is the root build file for GN. GN will start processing by loading this
+# file, and recursively load all dependencies until all dependencies are either
+# resolved or known not to exist (which will cause the build to fail). So if
+# you add a new build file, there must be some path of dependencies from this
+# file to your new one or GN won't know about it.
+# In GN, a "group" is a dummy target that just lists other targets.
+
+group("all") {
+  deps = [
+  ]
+}
diff --git a/DEPS b/DEPS
index 03c879a..7f4cef6 100644
--- a/DEPS
+++ b/DEPS
@@ -20,11 +20,15 @@
 
   "chromium_git": "https://chromium.googlesource.com",
   "buildtools_revision": "a7cc7a3e21a061975b33dcdcd81a9716ba614c3c",
+  "icu_revision": "9cd2828740572ba6f694b9365236a8356fd06147",
 }
 
 deps = {
   Var("root") + "/buildtools":
-    Var('chromium_git') + '/chromium/buildtools.git' + '@' +  Var('buildtools_revision'),
+    (Var('chromium_git') + '/chromium/buildtools.git' + '@' +
+     Var('buildtools_revision')),
+  Var("root") + "/third_party/icu":
+    Var('chromium_git') + '/chromium/deps/icu.git' + '@' + Var('icu_revision'),
 }
 
 include_rules = [
@@ -63,6 +67,12 @@
   },
   # TODO(veranika): run GN here.
   {
+    "name": "lastchange",
+    "pattern": ".",
+    "action": ["python", "src/build/util/lastchange.py",
+               "-o", "src/build/util/LASTCHANGE"],
+  },
+  {
     "name": "download_clang_format",
     "pattern": ".",
     "action": ["download_from_google_storage",
diff --git a/GITDEPS b/GITDEPS
index e2c1f0f..f33eb71 100644
--- a/GITDEPS
+++ b/GITDEPS
@@ -16,9 +16,13 @@
 # through sparse checkouts.
 
 vars = {
-  "chrome_revision": "HEAD",
-  "gyp_revision": "bac4680ec9a5c55ab692490b6732999648ecf1e9",
   "chrome_base_git": "https://chromium.googlesource.com/",
+
+  "ced_revision": "9012c0ab648025dd0f8df14294bf5d6d73793ac9",
+  "chrome_revision": "080936f5193590e65409c60127a510f71e910d73",
+  "gmock_revision": "0421b6f358139f02e102c9c332ce19a33faf75be",
+  "gtest_revision": "6f8a66431cb592dad629028a50b3dd418a408c87",
+  "gyp_revision": "bac4680ec9a5c55ab692490b6732999648ecf1e9",
 }
 
 deps = {
@@ -28,16 +32,33 @@
       # Chrome base and other top-level dependencies.
       "base",
       "build",
+      "build_overrides",
       "testing",
       "tools",
 
       # third_party dependencies.
+      "third_party/ced",
+      "third_party/libxml",
+      "third_party/modp_b64",
       "third_party/protobuf",
+      "third_party/zlib",
     ],
     Var("chrome_revision")
   ),
+  "third_party/ced/src":
+    (Var("chrome_base_git") + "external/github.com/google/compact_enc_det.git",
+     [],
+     Var("ced_revision")),
   "tools/gyp":
     (Var("chrome_base_git") + "external/gyp/",
-    [],
-    Var("gyp_revision")),
+     [],
+     Var("gyp_revision")),
+  "testing/gmock":
+    (Var("chrome_base_git") + "external/googlemock.git/",
+     [],
+     Var("gmock_revision")),
+  "testing/gtest":
+    (Var("chrome_base_git") + "external/github.com/google/googletest.git/",
+     [],
+     Var("gtest_revision")),
 }