| 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 // Maps hostnames to custom content settings. Written on the UI thread and read | 5 // Maps hostnames to custom content settings. Written on the UI thread and read |
| 6 // on any thread. One instance per profile. | 6 // on any thread. One instance per profile. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ | 8 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ |
| 9 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ | 9 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 public RefcountedKeyedService { | 50 public RefcountedKeyedService { |
| 51 public: | 51 public: |
| 52 enum ProviderType { | 52 enum ProviderType { |
| 53 // EXTENSION names is a layering violation when this class will move to | 53 // EXTENSION names is a layering violation when this class will move to |
| 54 // components. | 54 // components. |
| 55 // TODO(mukai): find the solution. | 55 // TODO(mukai): find the solution. |
| 56 INTERNAL_EXTENSION_PROVIDER = 0, | 56 INTERNAL_EXTENSION_PROVIDER = 0, |
| 57 POLICY_PROVIDER, | 57 POLICY_PROVIDER, |
| 58 SUPERVISED_PROVIDER, | 58 SUPERVISED_PROVIDER, |
| 59 CUSTOM_EXTENSION_PROVIDER, | 59 CUSTOM_EXTENSION_PROVIDER, |
| 60 NOTIFICATION_ANDROID_PROVIDER, |
| 60 PREF_PROVIDER, | 61 PREF_PROVIDER, |
| 61 DEFAULT_PROVIDER, | 62 DEFAULT_PROVIDER, |
| 62 NUM_PROVIDER_TYPES | 63 NUM_PROVIDER_TYPES |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 // This should be called on the UI thread, otherwise |thread_checker_| handles | 66 // This should be called on the UI thread, otherwise |thread_checker_| handles |
| 66 // CalledOnValidThread() wrongly. Only one (or neither) of | 67 // CalledOnValidThread() wrongly. Only one (or neither) of |
| 67 // |is_incognito_profile| and |is_guest_profile| should be true. | 68 // |is_incognito_profile| and |is_guest_profile| should be true. |
| 68 HostContentSettingsMap(PrefService* prefs, | 69 HostContentSettingsMap(PrefService* prefs, |
| 69 bool is_incognito_profile, | 70 bool is_incognito_profile, |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 base::ThreadChecker thread_checker_; | 392 base::ThreadChecker thread_checker_; |
| 392 | 393 |
| 393 base::ObserverList<content_settings::Observer> observers_; | 394 base::ObserverList<content_settings::Observer> observers_; |
| 394 | 395 |
| 395 base::WeakPtrFactory<HostContentSettingsMap> weak_ptr_factory_; | 396 base::WeakPtrFactory<HostContentSettingsMap> weak_ptr_factory_; |
| 396 | 397 |
| 397 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); | 398 DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMap); |
| 398 }; | 399 }; |
| 399 | 400 |
| 400 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ | 401 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_HOST_CONTENT_SETTINGS_MAP_H_ |
| OLD | NEW |