ChromePrompt Mojo IPC interface.

The interface will be pulled via DEPS in both Chromium (server side) and Software Reporter (client side) repos. Interface implementation will be landed in the Chromium repo.

BUG=690020
R=csharp@chromium.org, grt@chromium.org, joenotcharles@google.com, rockot@chromium.org

Review-Url: https://codereview.chromium.org/2750463006 .
diff --git a/.gitignore b/.gitignore
index 6dc5b77..f1b64e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,12 +52,23 @@
 /build
 /buildtools
 /build_overrides
+/chrome
+/crypto
+/ipc
+/mojo
 /testing
 /tools
 # Third party folders we pull in from DEPS
+/third_party/boringssl
+/third_party/catapult
 /third_party/ced
 /third_party/icu
+/third_party/jinja2
 /third_party/libxml
+/third_party/markupsafe
 /third_party/modp_b64
+/third_party/ply
 /third_party/protobuf
+/third_party/Webkit
+/third_party/yasm
 /third_party/zlib
\ No newline at end of file
diff --git a/BUILD.gn b/BUILD.gn
index 703f20b..2311c48 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -12,5 +12,6 @@
 
 group("all") {
   deps = [
+    "//chrome_cleaner/public/interfaces",
   ]
 }
diff --git a/DEPS b/DEPS
index 81cc0b2..218a801 100644
--- a/DEPS
+++ b/DEPS
@@ -1,4 +1,4 @@
-# Copyright 2014 Google Inc. All Rights Reserved.
+# Copyright 2017 The Chromium Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@
   "python_path": "python",
 
   "chromium_git": "https://chromium.googlesource.com",
+
   "buildtools_revision": "a7cc7a3e21a061975b33dcdcd81a9716ba614c3c",
+  "catapult_revision": "e9f547be045d4e50cb2d4927261d500e425c364c",
   "icu_revision": "9cd2828740572ba6f694b9365236a8356fd06147",
 }
 
@@ -27,6 +29,10 @@
   Var("root") + "/buildtools":
     (Var('chromium_git') + '/chromium/buildtools.git' + '@' +
      Var('buildtools_revision')),
+  Var("root") + "/third_party/catapult":
+    Var('chromium_git') +
+    '/external/github.com/catapult-project/catapult.git' + '@' +
+    Var('catapult_revision'),
   Var("root") + "/third_party/icu":
     Var('chromium_git') + '/chromium/deps/icu.git' + '@' + Var('icu_revision'),
 }
diff --git a/GITDEPS b/GITDEPS
index f33eb71..7dfcae7 100644
--- a/GITDEPS
+++ b/GITDEPS
@@ -1,4 +1,4 @@
-# Copyright 2015 Google Inc. All Rights Reserved.
+# Copyright 2017 The Chromium Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
   "chrome_base_git": "https://chromium.googlesource.com/",
 
   "ced_revision": "9012c0ab648025dd0f8df14294bf5d6d73793ac9",
-  "chrome_revision": "080936f5193590e65409c60127a510f71e910d73",
+  "chrome_revision": "a99e55b90960fc708f568e525c5621365ceab8e4",
   "gmock_revision": "0421b6f358139f02e102c9c332ce19a33faf75be",
   "gtest_revision": "6f8a66431cb592dad629028a50b3dd418a408c87",
   "gyp_revision": "bac4680ec9a5c55ab692490b6732999648ecf1e9",
@@ -33,14 +33,27 @@
       "base",
       "build",
       "build_overrides",
+      # Needed because of //base/win/BUILD.gn.
+      "chrome",
+      "crypto",
+      "ipc",
+      "mojo",
       "testing",
       "tools",
 
       # third_party dependencies.
+      "third_party/boringssl",
       "third_party/ced",
+      "third_party/jinja2",
       "third_party/libxml",
+      "third_party/markupsafe",
       "third_party/modp_b64",
+      "third_party/ply",
       "third_party/protobuf",
+      # This is needed due to a dependency in mojo/public/cpp/bindings
+      # (see crbug.com/617718).
+      "third_party/Webkit",
+      "third_party/yasm",
       "third_party/zlib",
     ],
     Var("chrome_revision")
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..9d0e8c9
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,5 @@
+alito@chromium.org
+csharp@chromium.org
+ftirelo@chromium.org
+joenotcharles@chromium.org
+robertshield@chromium.org
diff --git a/chrome_cleaner/public/interfaces/BUILD.gn b/chrome_cleaner/public/interfaces/BUILD.gn
new file mode 100644
index 0000000..039f122
--- /dev/null
+++ b/chrome_cleaner/public/interfaces/BUILD.gn
@@ -0,0 +1,11 @@
+# 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.
+
+import("//mojo/public/tools/bindings/mojom.gni")
+
+mojom("interfaces") {
+  sources = [
+    "chrome_prompt.mojom",
+  ]
+}
diff --git a/chrome_cleaner/public/interfaces/chrome_prompt.mojom b/chrome_cleaner/public/interfaces/chrome_prompt.mojom
new file mode 100644
index 0000000..04d986e
--- /dev/null
+++ b/chrome_cleaner/public/interfaces/chrome_prompt.mojom
@@ -0,0 +1,65 @@
+// 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.
+
+module chrome_cleaner.mojom;
+
+// The behaviours that have been observed for a given UwS.
+struct ObservedBehaviours {
+  bool ad_injector;
+  bool settings_hijacker;
+  bool extensions_injector;
+  bool dropper;
+};
+
+// Information about removable Unwanted Software matched by the Software
+// Reporter to be shown in the Chrome prompt.
+struct UwS {
+  // The id of this unwanted software.
+  int32 id;
+
+  // The name of this unwanted software.
+  string name;
+
+  // Behaviors observed for this UwS to be presented to the user in the Chrome
+  // prompt.
+  ObservedBehaviours observed_behaviours;
+
+  // List of fully-qualified paths of the files that will be deleted by the
+  // Chrome Cleanup Tool for this unwanted software.
+  array<string> files_to_delete;
+};
+
+[Extensible]
+enum PromptAcceptance {
+  UNSPECIFIED = 0,
+  // The Chrome prompt was not shown to the user (for example, due to an
+  // experiment run that shouldn't prompt the user or because the user has
+  // been prompted recently).
+  NOT_SHOWN = 1,
+  // The user explicitly accepted the Chrome prompt, but didn't opt into
+  // uploading logs to Google.
+  ACCEPTED_WITHOUT_LOGS = 2,
+  // The user explicitly accepted the Chrome prompt and also opted into
+  // uploading logs to Google.
+  ACCEPTED_WITH_LOGS = 3,
+  // The user explicitly denied the Chrome prompt.
+  DENIED = 4,
+  // The user didn't interact with the Chrome prompt after a while.
+  IGNORED = 5,
+};
+
+// Service provided by Chrome to prompt the user to run the Chrome Cleanup Tool
+// if unwanted software is detected on the system. This service is used by the
+// Software Reporter Tool so that all user interaction is provided by Chrome.
+interface ChromePrompt {
+  // Params:
+  //  - removable_uws_found: the list of UwS detected by the reporter;
+  //  - elevation_required: if the cleaner will need to run in elevated mode.
+  // Returns:
+  //  - prompt_acceptance: indicates if the user accepted the prompt; if the
+  //                       prompt is accepted, it also indicates if logs
+  //                       uploading is allowed.
+  PromptUser(array<UwS> removable_uws_found, bool elevation_required)
+      => (PromptAcceptance prompt_acceptance);
+};