| 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 "components/content_settings/core/browser/content_settings_default_prov
ider.h" | 5 #include "components/content_settings/core/browser/content_settings_default_prov
ider.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS | 48 CONTENT_SETTING_ALLOW, // CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS |
| 49 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
| 50 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP | 50 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP |
| 51 #elif defined(OS_ANDROID) || defined(OS_CHROMEOS) | 51 #elif defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 52 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER | 52 CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER |
| 53 #endif | 53 #endif |
| 54 #if defined(OS_ANDROID) | 54 #if defined(OS_ANDROID) |
| 55 CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_APP_BANNER | 55 CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_APP_BANNER |
| 56 #endif | 56 #endif |
| 57 }; | 57 }; |
| 58 COMPILE_ASSERT(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES, | 58 static_assert(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES, |
| 59 default_settings_incorrect_size); | 59 "kDefaultSettings should have CONTENT_SETTINGS_NUM_TYPES " |
| 60 "elements"); |
| 60 | 61 |
| 61 } // namespace | 62 } // namespace |
| 62 | 63 |
| 63 namespace content_settings { | 64 namespace content_settings { |
| 64 | 65 |
| 65 namespace { | 66 namespace { |
| 66 | 67 |
| 67 class DefaultRuleIterator : public RuleIterator { | 68 class DefaultRuleIterator : public RuleIterator { |
| 68 public: | 69 public: |
| 69 explicit DefaultRuleIterator(const base::Value* value) { | 70 explicit DefaultRuleIterator(const base::Value* value) { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // Migrate obsolete cookie prompt mode. | 332 // Migrate obsolete cookie prompt mode. |
| 332 if (ValueToContentSetting( | 333 if (ValueToContentSetting( |
| 333 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == | 334 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].get()) == |
| 334 CONTENT_SETTING_ASK) { | 335 CONTENT_SETTING_ASK) { |
| 335 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( | 336 default_settings_[CONTENT_SETTINGS_TYPE_COOKIES].reset( |
| 336 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); | 337 new base::FundamentalValue(CONTENT_SETTING_BLOCK)); |
| 337 } | 338 } |
| 338 } | 339 } |
| 339 | 340 |
| 340 } // namespace content_settings | 341 } // namespace content_settings |
| OLD | NEW |