forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
browser_persister_file_utils.h
39 lines (28 loc) · 1.31 KB
/
browser_persister_file_utils.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
// Copyright 2020 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 WEBLAYER_BROWSER_PERSISTENCE_BROWSER_PERSISTER_FILE_UTILS_H_
#define WEBLAYER_BROWSER_PERSISTENCE_BROWSER_PERSISTER_FILE_UTILS_H_
#include <string>
#include "base/callback_forward.h"
#include "base/containers/flat_set.h"
namespace base {
class FilePath;
}
namespace weblayer {
class ProfileImpl;
// Returns the set of known persistence ids for the profile at |path|.
base::flat_set<std::string> GetBrowserPersistenceIdsOnBackgroundThread(
const base::FilePath& path);
// Returns the path to save persistence information. |base_path| is the base
// path of the profile, and |browser_id| the persistence id.
base::FilePath BuildPathForBrowserPersister(const base::FilePath& base_path,
const std::string& browser_id);
// Implementation of RemoveBrowserPersistenceStorage(). Tries to remove all
// the persistence files for the set of browser persistence ids.
void RemoveBrowserPersistenceStorageImpl(
ProfileImpl* profile,
base::OnceCallback<void(bool)> done_callback,
base::flat_set<std::string> ids);
} // namespace weblayer
#endif // WEBLAYER_BROWSER_PERSISTENCE_BROWSER_PERSISTER_FILE_UTILS_H_