OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/content_settings/content_settings_default_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_default_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 namespace { | 68 namespace { |
69 | 69 |
70 class DefaultRuleIterator : public RuleIterator { | 70 class DefaultRuleIterator : public RuleIterator { |
71 public: | 71 public: |
72 explicit DefaultRuleIterator(const base::Value* value) { | 72 explicit DefaultRuleIterator(const base::Value* value) { |
73 if (value) | 73 if (value) |
74 value_.reset(value->DeepCopy()); | 74 value_.reset(value->DeepCopy()); |
75 } | 75 } |
76 | 76 |
77 virtual bool HasNext() const OVERRIDE { | 77 virtual bool HasNext() const override { |
78 return value_.get() != NULL; | 78 return value_.get() != NULL; |
79 } | 79 } |
80 | 80 |
81 virtual Rule Next() OVERRIDE { | 81 virtual Rule Next() override { |
82 DCHECK(value_.get()); | 82 DCHECK(value_.get()); |
83 return Rule(ContentSettingsPattern::Wildcard(), | 83 return Rule(ContentSettingsPattern::Wildcard(), |
84 ContentSettingsPattern::Wildcard(), | 84 ContentSettingsPattern::Wildcard(), |
85 value_.release()); | 85 value_.release()); |
86 } | 86 } |
87 | 87 |
88 private: | 88 private: |
89 scoped_ptr<base::Value> value_; | 89 scoped_ptr<base::Value> value_; |
90 }; | 90 }; |
91 | 91 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // Migrate obsolete cookie prompt mode. | 336 // Migrate obsolete cookie prompt mode. |
337 if (ValueToContentSetting( | 337 if (ValueToContentSetting( |
338 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == | 338 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == |
339 CONTENT_SETTING_ASK) { | 339 CONTENT_SETTING_ASK) { |
340 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( | 340 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( |
341 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); | 341 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); |
342 } | 342 } |
343 } | 343 } |
344 | 344 |
345 } // namespace content_settings | 345 } // namespace content_settings |
OLD | NEW |