naiveproxy/components/chrome_cleaner/public/interfaces/chrome_prompt.mojom

45 lines
1.6 KiB
Plaintext
Raw Normal View History

2018-01-28 19:30:36 +03:00
// 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;
};
// 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:
// - removable_uws_found: list of fully-qualified paths of the files that
// will be deleted by the Chrome Cleanup Tool.
// Returns:
// - prompt_acceptance: indicates if the user accepted the prompt.
PromptUser(array<FilePath> files_to_delete)
=> (PromptAcceptance prompt_acceptance);
};