Remove Chrome OS-related GN build configuration

We don't support Chrome OS, so no need for build configuration.

R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/1581753002 .
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 366ae2e..eff163a 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -663,7 +663,7 @@
 
   # Allow more direct string conversions on platforms with native utf8
   # strings
-  if (is_mac || is_ios || is_chromeos) {
+  if (is_mac || is_ios) {
     defines = [ "SYSTEM_NATIVE_UTF8" ]
   }
 
@@ -681,18 +681,14 @@
 
     deps += [
       ":base_jni_headers",
-      "//third_party/ashmem",
       "//third_party/android_tools:cpu_features",
+      "//third_party/ashmem",
     ]
 
     # logging.cc uses the Android logging library.
     libs = [ "log" ]
   }
 
-  if (is_chromeos) {
-    sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ]
-  }
-
   if (is_nacl) {
     # We reset sources_assignment_filter in order to explicitly include
     # the linux file (which would otherwise be filtered out).
@@ -896,7 +892,7 @@
   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
 }
 
-if (is_win || (is_linux && !is_chromeos)) {
+if (is_win || is_linux) {
   # TODO(GYP): Figure out which of these work and are needed on other platforms.
   test("base_perftests") {
     sources = [
@@ -909,8 +905,8 @@
       ":base",
       "//base/test:test_support",
       "//base/test:test_support_perf",
-      "//testing/perf",
       "//testing/gtest",
+      "//testing/perf",
     ]
 
     if (is_android) {
@@ -1319,7 +1315,7 @@
 
   # Allow more direct string conversions on platforms with native utf8
   # strings
-  if (is_mac || is_ios || is_chromeos) {
+  if (is_mac || is_ios) {
     defines = [ "SYSTEM_NATIVE_UTF8" ]
   }
 
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 5be9716..214456d 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -94,12 +94,11 @@
   is_debug = true
 
   # Whether we're a traditional desktop unix.
-  is_desktop_linux = current_os == "linux" && current_os != "chromeos"
+  is_desktop_linux = current_os == "linux"
 
   # Set to true when compiling with the Clang compiler. Typically this is used
   # to configure warnings.
-  is_clang = current_os == "mac" || current_os == "ios" ||
-             current_os == "linux" || current_os == "chromeos"
+  is_clang = current_os == "mac" || current_os == "ios" || current_os == "linux"
 
   # By default, assume a non-PNaCl toolchain.
   is_pnacl = false
@@ -128,13 +127,6 @@
   # Compile for Thread Sanitizer to find threading bugs.
   is_tsan = false
 
-  if (current_os == "chromeos") {
-    # Allows the target toolchain to be injected as arguments. This is needed
-    # to support the CrOS build system which supports per-build-configuration
-    # toolchains.
-    cros_use_custom_toolchain = false
-  }
-
   # DON'T ADD MORE FLAGS HERE. Read the comment above.
 }
 
@@ -145,11 +137,11 @@
 # We set these various is_FOO booleans for convenience in writing OS-based
 # conditions.
 #
-# - is_android, is_chromeos, is_ios, and is_win should be obvious.
+# - is_android, is_ios, and is_win should be obvious.
 # - is_mac is set only for desktop Mac. It is not set on iOS.
 # - is_posix is true for mac and any Unix-like system (basically everything
 #   except Windows).
-# - is_linux is true for desktop Linux and ChromeOS, but not Android (which is
+# - is_linux is true for desktop Linux, but not Android (which is
 #   generally too different despite being based on the Linux kernel).
 #
 # Do not add more is_* variants here for random lesser-used Unix systems like
@@ -176,16 +168,6 @@
   is_nacl = false
   is_posix = true
   is_win = false
-} else if (current_os == "chromeos") {
-  is_android = false
-  is_chromeos = true
-  is_fnl = false
-  is_ios = false
-  is_linux = true
-  is_mac = false
-  is_nacl = false
-  is_posix = true
-  is_win = false
 } else if (current_os == "nacl") {
   # current_os == "nacl" will be passed by the nacl toolchain definition.
   # It is not set by default or on the command line. We treat is as a
@@ -557,9 +539,6 @@
     host_toolchain = "//build/toolchain/linux:$host_cpu"
     set_default_toolchain("//build/toolchain/linux:$current_cpu")
   }
-  if (is_chromeos && cros_use_custom_toolchain) {
-    set_default_toolchain("//build/toolchain/cros:target")
-  }
   if (is_fnl) {
     set_default_toolchain("//build/toolchain/fnl:target")
   }
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index bf2cdb3..01addd9 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -104,8 +104,7 @@
   }
 
   # Linker warnings.
-  if (!(is_chromeos && current_cpu == "arm") && !is_mac && !is_ios) {
-    # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
+  if (!is_mac && !is_ios) {
     ldflags += [ "-Wl,--fatal-warnings" ]
   }
 
@@ -426,13 +425,6 @@
         ldflags += [ "-Wl,--icf=all" ]
       }
     }
-
-    # TODO(thestig): Make this flag work with GN.
-    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
-    #  ldflags += [
-    #    "-Wl,--detect-odr-violations",
-    #  ]
-    #}
   }
 
   if (linux_use_bundled_binutils) {
diff --git a/build/config/features.gni b/build/config/features.gni
index d1bdfbc..a235be4 100644
--- a/build/config/features.gni
+++ b/build/config/features.gni
@@ -31,7 +31,7 @@
   # the commented out logic.
   # Eventually we want this to be:
   #   enable_nacl = !is_ios && !is_android
-  enable_nacl = (is_linux && !is_chromeos && current_cpu == "x64") || is_nacl
+  enable_nacl = (is_linux && current_cpu == "x64") || is_nacl
   enable_nacl_untrusted = enable_nacl
   enable_pnacl = enable_nacl_untrusted
 }
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 77447a6..c54be93 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -21,12 +21,6 @@
                              ],
                              "value") ]
   }
-
-  # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like
-  # OS_LINUX and the like.
-  if (is_chromeos) {
-    defines = [ "OS_CHROMEOS" ]
-  }
 }
 
 config("x11") {
diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni
index 2be55c8..4fcfc4b 100644
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -34,7 +34,7 @@
   }
 } else if (is_fnl) {
   assert(false, "FNL needs target_sysroot")
-} else if (is_linux && is_chrome_branded && is_official_build && !is_chromeos) {
+} else if (is_linux && is_chrome_branded && is_official_build) {
   # For official builds, use the sysroot checked into the internal source repo
   # so that the builds work on older versions of Linux.
   if (current_cpu == "x64") {
@@ -46,7 +46,7 @@
     # Any other builds don't use a sysroot.
     sysroot = ""
   }
-} else if (is_linux && !is_chromeos) {
+} else if (is_linux) {
   if (current_cpu == "mipsel") {
     sysroot = rebase_path("//mipsel-sysroot/sysroot")
   } else {
diff --git a/build/sanitizers/BUILD.gn b/build/sanitizers/BUILD.gn
index c4afd02..6744e73 100644
--- a/build/sanitizers/BUILD.gn
+++ b/build/sanitizers/BUILD.gn
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-if (is_linux && !is_chromeos) {
+if (is_linux) {
   # TODO(GYP): Figure out which of these work and are needed on other platforms.
   copy("copy_llvm_symbolizer") {
     sources = [
diff --git a/build/secondary/tools/grit/grit_rule.gni b/build/secondary/tools/grit/grit_rule.gni
index 77921b6..5242adb 100644
--- a/build/secondary/tools/grit/grit_rule.gni
+++ b/build/secondary/tools/grit/grit_rule.gni
@@ -107,15 +107,6 @@
   ]
 }
 
-if (is_chromeos) {
-  grit_defines += [
-    "-D",
-    "chromeos",
-    "-D",
-    "scale_factors=2x",
-  ]
-}
-
 if (is_desktop_linux) {
   grit_defines += [
     "-D",
diff --git a/build/toolchain/cros/BUILD.gn b/build/toolchain/cros/BUILD.gn
deleted file mode 100644
index 9174161..0000000
--- a/build/toolchain/cros/BUILD.gn
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2014 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.
-
-import("//build/toolchain/clang.gni")
-import("//build/toolchain/gcc_toolchain.gni")
-
-declare_args() {
-  # The CrOS build system supports many different kinds of targets across
-  # many different architectures. Bringing your own toolchain is also supported,
-  # so it's actually impossible to enumerate all toolchains for all targets
-  # as GN toolchain specifications.
-  # These arguments provide a mechanism for specifying your CC, CXX and AR at
-  # buildfile-generation time, allowing the CrOS build system to always use
-  # the right tools for the current target.
-  cros_target_cc = ""
-  cros_target_cxx = ""
-  cros_target_ar = ""
-}
-
-gcc_toolchain("target") {
-  assert(cros_target_cc != "", "Must provide target CC.")
-  assert(cros_target_cxx != "", "Must provide target CXX.")
-  assert(cros_target_ar != "", "Must provide target AR.")
-
-  cc = "${cros_target_cc}"
-  cxx = "${cros_target_cxx}"
-
-  ar = "${cros_target_ar}"
-  ld = cxx
-
-  toolchain_cpu = "${target_cpu}"
-  toolchain_os = "linux"
-  is_clang = is_clang
-  use_ccache = false
-  use_goma = false
-}
diff --git a/third_party/breakpad/BUILD.gn b/third_party/breakpad/BUILD.gn
index ad1011e..55fd23f 100644
--- a/third_party/breakpad/BUILD.gn
+++ b/third_party/breakpad/BUILD.gn
@@ -358,9 +358,9 @@
     include_dirs = [ "src/client/apple/Framework" ]
 
     deps = [
-      ":utilities",
       ":crash_inspector",
       ":crash_report_sender",
+      ":utilities",
     ]
   }
 
@@ -515,12 +515,6 @@
     configs += [ "//build/config/compiler:no_chromium_code" ]
     public_configs = [ ":client_config" ]
 
-    if (current_cpu == "arm" && is_chromeos) {
-      # Avoid running out of registers in
-      # linux_syscall_support.h:sys_clone()'s inline assembly.
-      cflags = [ "-marm" ]
-    }
-
     if (is_android) {
       sources += [ "src/common/android/breakpad_getcontext.S" ]
     }
@@ -594,11 +588,11 @@
 
     deps = [
       ":client",
-      ":processor_support",
       ":linux_dumper_unittest_helper",
+      ":processor_support",
+      "//testing/gmock",
       "//testing/gtest",
       "//testing/gtest:gtest_main",
-      "//testing/gmock",
     ]
 
     include_dirs = [