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

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

Issue 440423003: Clean content_settings_pattern_parser.* from unnecessary dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed the clients Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_ 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_ 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 18 matching lines...) Expand all
29 const ContentSettingsPattern& primary_pattern() const { 29 const ContentSettingsPattern& primary_pattern() const {
30 return primary_pattern_; 30 return primary_pattern_;
31 } 31 }
32 32
33 // The top level frame pattern whose settings have changed. 33 // The top level frame pattern whose settings have changed.
34 const ContentSettingsPattern& secondary_pattern() const { 34 const ContentSettingsPattern& secondary_pattern() const {
35 return secondary_pattern_; 35 return secondary_pattern_;
36 } 36 }
37 37
38 // True if all settings should be updated for the given type. 38 // True if all settings should be updated for the given type.
39 bool update_all() const { 39 bool update_all() const;
40 return primary_pattern_.ToString().empty() &&
41 secondary_pattern_.ToString().empty();
42 }
43 40
44 // The type of the pattern whose settings have changed. 41 // The type of the pattern whose settings have changed.
45 ContentSettingsType type() const { return type_; } 42 ContentSettingsType type() const { return type_; }
46 43
47 // The resource identifier for the settings type that has changed. 44 // The resource identifier for the settings type that has changed.
48 const std::string& resource_identifier() const { 45 const std::string& resource_identifier() const {
49 return resource_identifier_; 46 return resource_identifier_;
50 } 47 }
51 48
52 // True if all types should be updated. If update_all() is false, this will 49 // True if all types should be updated. If update_all() is false, this will
53 // be false as well (although the reverse does not hold true). 50 // be false as well (although the reverse does not hold true).
54 bool update_all_types() const { 51 bool update_all_types() const {
55 return CONTENT_SETTINGS_TYPE_DEFAULT == type_; 52 return CONTENT_SETTINGS_TYPE_DEFAULT == type_;
56 } 53 }
57 54
58 private: 55 private:
59 ContentSettingsPattern primary_pattern_; 56 ContentSettingsPattern primary_pattern_;
60 ContentSettingsPattern secondary_pattern_; 57 ContentSettingsPattern secondary_pattern_;
61 ContentSettingsType type_; 58 ContentSettingsType type_;
62 std::string resource_identifier_; 59 std::string resource_identifier_;
63 60
64 DISALLOW_COPY_AND_ASSIGN(ContentSettingsDetails); 61 DISALLOW_COPY_AND_ASSIGN(ContentSettingsDetails);
65 }; 62 };
66 63
67 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_ 64 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/content_settings_details.cc » ('j') | chrome/common/content_settings_pattern.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698