forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent_settings_manager_delegate.cc
37 lines (28 loc) · 1.22 KB
/
content_settings_manager_delegate.cc
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
// 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.
#include "weblayer/browser/content_settings_manager_delegate.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "weblayer/browser/cookie_settings_factory.h"
namespace weblayer {
ContentSettingsManagerDelegate::ContentSettingsManagerDelegate() = default;
ContentSettingsManagerDelegate::~ContentSettingsManagerDelegate() = default;
scoped_refptr<content_settings::CookieSettings>
ContentSettingsManagerDelegate::GetCookieSettings(
content::BrowserContext* browser_context) {
return CookieSettingsFactory::GetForBrowserContext(browser_context);
}
bool ContentSettingsManagerDelegate::AllowStorageAccess(
int render_process_id,
int render_frame_id,
content_settings::mojom::ContentSettingsManager::StorageType storage_type,
const GURL& url,
bool allowed,
base::OnceCallback<void(bool)>* callback) {
return false;
}
std::unique_ptr<content_settings::ContentSettingsManagerImpl::Delegate>
ContentSettingsManagerDelegate::Clone() {
return std::make_unique<ContentSettingsManagerDelegate>();
}
} // namespace weblayer