Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: chrome/browser/content_settings/chrome_content_settings_client.cc

Issue 2375333003: Remove content_settings_client.h abstraction which isn't used (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/content_settings/chrome_content_settings_client.h"
6 #include "chrome/browser/profiles/profile.h"
7
8 DEFINE_WEB_CONTENTS_USER_DATA_KEY(ChromeContentSettingsClient);
9
10 ChromeContentSettingsClient::~ChromeContentSettingsClient() {
11 }
12
13 void ChromeContentSettingsClient::OnCookiesRead(
14 const GURL& url,
15 const GURL& first_party_url,
16 const net::CookieList& cookie_list,
17 bool blocked_by_policy) {
18 // TODO(vabr): This is just a dummy implementation, replace with methods from
19 // TabSpecificContentSettings.
20 }
21
22 void ChromeContentSettingsClient::OnCookieChanged(
23 const GURL& url,
24 const GURL& first_party_url,
25 const std::string& cookie_line,
26 const net::CookieOptions& options,
27 bool blocked_by_policy) {
28 // TODO(vabr): This is just a dummy implementation, replace with methods from
29 // TabSpecificContentSettings.
30 }
31
32 void ChromeContentSettingsClient::OnFileSystemAccessed(const GURL& url,
33 bool blocked_by_policy) {
34 // TODO(vabr): This is just a dummy implementation, replace with methods from
35 // TabSpecificContentSettings.
36 }
37
38 void ChromeContentSettingsClient::OnIndexedDBAccessed(
39 const GURL& url,
40 const base::string16& description,
41 bool blocked_by_policy) {
42 // TODO(vabr): This is just a dummy implementation, replace with methods from
43 // TabSpecificContentSettings.
44 }
45
46 void ChromeContentSettingsClient::OnLocalStorageAccessed(
47 const GURL& url,
48 bool local,
49 bool blocked_by_policy) {
50 // TODO(vabr): This is just a dummy implementation, replace with methods from
51 // TabSpecificContentSettings.
52 }
53
54 void ChromeContentSettingsClient::OnWebDatabaseAccessed(
55 const GURL& url,
56 const base::string16& name,
57 const base::string16& display_name,
58 bool blocked_by_policy) {
59 // TODO(vabr): This is just a dummy implementation, replace with methods from
60 // TabSpecificContentSettings.
61 }
62
63 const LocalSharedObjectsCounter&
64 ChromeContentSettingsClient::local_shared_objects(AccessType type) const {
65 switch (type) {
66 case ALLOWED:
67 return allowed_local_shared_objects_;
68 case BLOCKED:
69 return blocked_local_shared_objects_;
70 }
71 // Some compilers don't believe this is not reachable, so let's return a dummy
72 // value.
73 NOTREACHED();
74 return blocked_local_shared_objects_;
75 }
76
77 std::unique_ptr<CookiesTreeModel>
78 ChromeContentSettingsClient::CreateCookiesTreeModel(AccessType type) const {
79 switch (type) {
80 case ALLOWED:
81 return allowed_local_shared_objects_.CreateCookiesTreeModel();
82 case BLOCKED:
83 return blocked_local_shared_objects_.CreateCookiesTreeModel();
84 }
85 // Some compilers don't believe this is not reachable, so let's return a dummy
86 // value.
87 NOTREACHED();
88 return std::unique_ptr<CookiesTreeModel>();
89 }
90
91 ChromeContentSettingsClient::ChromeContentSettingsClient(
92 content::WebContents* contents)
93 : allowed_local_shared_objects_(
94 Profile::FromBrowserContext(contents->GetBrowserContext())),
95 blocked_local_shared_objects_(
96 Profile::FromBrowserContext(contents->GetBrowserContext())) {
97 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/chrome_content_settings_client.h ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698