-
Notifications
You must be signed in to change notification settings - Fork 6.6k
/
sandboxed_lnk_parser_test_util.h
45 lines (37 loc) · 1.75 KB
/
sandboxed_lnk_parser_test_util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2018 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.
#ifndef CHROME_CHROME_CLEANER_PARSERS_SHORTCUT_PARSER_SANDBOXED_LNK_PARSER_TEST_UTIL_H_
#define CHROME_CHROME_CLEANER_PARSERS_SHORTCUT_PARSER_SANDBOXED_LNK_PARSER_TEST_UTIL_H_
#include <windows.h>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>
#include "base/files/scoped_temp_dir.h"
#include "base/win/scoped_handle.h"
#include "base/win/shortcut.h"
#include "chrome/chrome_cleaner/parsers/shortcut_parser/target/lnk_parser.h"
namespace chrome_cleaner {
base::win::ScopedHandle CreateAndOpenShortcutInTempDir(
const std::string& lnk_name,
const base::win::ShortcutProperties& properties,
base::ScopedTempDir* temp_dir);
bool CheckParsedShortcut(const ParsedLnkFile& parsed_shortcut,
base::FilePath expected_target_path,
base::FilePath expected_working_dir,
std::wstring expected_arguments,
base::FilePath expected_icon_location,
const int32_t icon_index);
void OnLnkParseDone(
ParsedLnkFile* out_parsed_shortcut,
mojom::LnkParsingResult* out_result_code,
base::OnceClosure callback,
mojom::LnkParsingResult result_code,
const base::Optional<std::wstring>& optional_target_path,
const base::Optional<std::wstring>& optional_working_dir,
const base::Optional<std::wstring>& optional_command_line_arguments,
const base::Optional<std::wstring>& optional_icon_location,
int32_t optional_icon_index);
} // namespace chrome_cleaner
#endif // CHROME_CHROME_CLEANER_PARSERS_SHORTCUT_PARSER_SANDBOXED_LNK_PARSER_TEST_UTIL_H_