naiveproxy/components/chrome_cleaner/public/interfaces/chrome_prompt.mojom
2018-01-28 13:32:06 -05:00

54 lines
2.0 KiB
Plaintext

// 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;
// IMPORTANT NOTE: Avoid adding dependencies to typemapped .mojom files.
// Enabling typemaps currently (as of July 2017) requires indirectly depending
// on all existing typemap definitions. The Chrome Cleaner is built
// independently from Chromium and would like to avoid these dependencies.
// Once it's possible to specify a limited subset of typemaps to use, be
// careful not to add dependencies to [Native] mojo structures. The wire format
// for [Native] structs is not guaranteed to be consistent between versions.
[Extensible]
enum PromptAcceptance {
UNSPECIFIED = 0,
// The user explicitly accepted the cleanup operation and cleaner logs
// upload is allowed.
ACCEPTED_WITH_LOGS = 1,
// The user explicitly accepted the cleanup operation and cleaner logs
// upload is not allowed.
ACCEPTED_WITHOUT_LOGS = 2,
// The user explicitly denied the Chrome prompt.
DENIED = 3,
NUM_VALUES,
};
struct FilePath {
array<uint16> value;
};
struct RegistryKey {
// A string formatted for display to the user.
// Example: HKCU:32\software\unwanted_software
array<uint16> value;
};
// Service provided by Chrome to prompt the user to start a cleanup if the
// Chrome Cleanup Tool detects unwanted software on the system.
interface ChromePrompt {
// Params:
// - files_to_delete: list of fully-qualified paths of the files that will
// be deleted by the Chrome Cleanup Tool.
// - registry_keys: list of fully-qualified paths of the registry keys that
// will be changed or deleted by the Chrome Cleanup Tool.
// Returns:
// - prompt_acceptance: indicates if the user accepted the prompt.
PromptUser(array<FilePath> files_to_delete,
[MinVersion=1] array<RegistryKey>? registry_keys)
=> (PromptAcceptance prompt_acceptance);
};