forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_search_engine.h
35 lines (26 loc) · 1.2 KB
/
default_search_engine.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
// 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_DEFAULT_SEARCH_ENGINE_H_
#define WEBLAYER_BROWSER_DEFAULT_SEARCH_ENGINE_H_
#include "components/content_settings/core/common/content_settings.h"
namespace content {
class BrowserContext;
}
namespace url {
class Origin;
}
namespace weblayer {
const url::Origin& GetDseOrigin();
// Returns whether permissions for |type| and |origin| are controlled by
// WebLayer's default search engine logic. This only applies to the GEOLOCATION
// permission, which will be force allowed and controlled by the client app's
// system level location permissions.
bool IsPermissionControlledByDse(ContentSettingsType type,
const url::Origin& origin);
// Resets all permissions managed by WebLayer for the default search engine.
// TODO(crbug.com/1063433): If this logic gets more complicated consider
// refactoring SearchPermissionsService to be used in WebLayer.
void ResetDsePermissions(content::BrowserContext* browser_context);
} // namespace weblayer
#endif // WEBLAYER_BROWSER_DEFAULT_SEARCH_ENGINE_H_