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

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

Issue 646973002: Introduce ChromeContentSettingsClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compiler issues Created 6 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 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_CLIENT_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_CLIENT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/browsing_data/cookies_tree_model.h"
10 #include "chrome/browser/content_settings/local_shared_objects_container.h"
11 #include "components/content_settings/core/browser/content_settings_client.h"
12 #include "content/public/browser/web_contents_user_data.h"
13
14 // Chrome-specific implementation of the ContentSettingsClient interface.
15 class ChromeContentSettingsClient
16 : public content_settings::ContentSettingsClient,
17 public content::WebContentsUserData<ChromeContentSettingsClient> {
18 public:
19 virtual ~ChromeContentSettingsClient();
20
21 static void CreateForWebContents(content::WebContents* contents);
22
23 // ContentSettingsClient implementation.
24 virtual void OnCookiesRead(const GURL& url,
25 const GURL& first_party_url,
26 const net::CookieList& cookie_list,
27 bool blocked_by_policy) override;
28 virtual void OnCookieChanged(const GURL& url,
29 const GURL& first_party_url,
30 const std::string& cookie_line,
31 const net::CookieOptions& options,
32 bool blocked_by_policy) override;
33 virtual void OnFileSystemAccessed(const GURL& url,
34 bool blocked_by_policy) override;
35 virtual void OnIndexedDBAccessed(const GURL& url,
36 const base::string16& description,
37 bool blocked_by_policy) override;
38 virtual void OnLocalStorageAccessed(const GURL& url,
39 bool local,
40 bool blocked_by_policy) override;
41 virtual void OnWebDatabaseAccessed(const GURL& url,
42 const base::string16& name,
43 const base::string16& display_name,
44 bool blocked_by_policy) override;
45 virtual const LocalSharedObjectsCounter& local_shared_objects(
46 AccessType type) const override;
47
48 // Creates a new copy of a CookiesTreeModel for all allowed (or blocked,
49 // depending on |type) local shared objects.
blundell 2014/10/13 08:55:58 nit: |type|.
vabr (Chromium) 2014/10/13 09:33:17 Done.
50 scoped_ptr<CookiesTreeModel> CreateCookiesTreeModel(AccessType type) const;
51
52 private:
53 friend class content::WebContentsUserData<ChromeContentSettingsClient>;
54
55 explicit ChromeContentSettingsClient(content::WebContents* contents);
56
57 // Stores the blocked/allowed site data.
58 LocalSharedObjectsContainer allowed_local_shared_objects_;
59 LocalSharedObjectsContainer blocked_local_shared_objects_;
60
61 DISALLOW_COPY_AND_ASSIGN(ChromeContentSettingsClient);
62 };
63
64 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/chrome_content_settings_client.cc » ('j') | chrome/browser/ui/tab_helpers.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698