| 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/extensions/api/preference/preference_api.h" | 5 #include "chrome/browser/extensions/api/preference/preference_api.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 APIPermission::kPrivacy | 100 APIPermission::kPrivacy |
| 101 }, | 101 }, |
| 102 { "thirdPartyCookiesAllowed", | 102 { "thirdPartyCookiesAllowed", |
| 103 prefs::kBlockThirdPartyCookies, | 103 prefs::kBlockThirdPartyCookies, |
| 104 APIPermission::kPrivacy | 104 APIPermission::kPrivacy |
| 105 }, | 105 }, |
| 106 { "translationServiceEnabled", | 106 { "translationServiceEnabled", |
| 107 prefs::kEnableTranslate, | 107 prefs::kEnableTranslate, |
| 108 APIPermission::kPrivacy | 108 APIPermission::kPrivacy |
| 109 }, | 109 }, |
| 110 #if defined(ENABLE_GOOGLE_NOW) | |
| 111 { "googlegeolocationaccessEnabled", | |
| 112 prefs::kGoogleGeolocationAccessEnabled, | |
| 113 APIPermission::kPreferencesPrivate | |
| 114 }, | |
| 115 #endif | |
| 116 }; | 110 }; |
| 117 | 111 |
| 118 class IdentityPrefTransformer : public PrefTransformerInterface { | 112 class IdentityPrefTransformer : public PrefTransformerInterface { |
| 119 public: | 113 public: |
| 120 virtual Value* ExtensionToBrowserPref(const Value* extension_pref, | 114 virtual Value* ExtensionToBrowserPref(const Value* extension_pref, |
| 121 std::string* error, | 115 std::string* error, |
| 122 bool* bad_message) OVERRIDE { | 116 bool* bad_message) OVERRIDE { |
| 123 return extension_pref->DeepCopy(); | 117 return extension_pref->DeepCopy(); |
| 124 } | 118 } |
| 125 | 119 |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 std::string browser_pref; | 732 std::string browser_pref; |
| 739 if (!ValidateBrowserPref(pref_key, &browser_pref)) | 733 if (!ValidateBrowserPref(pref_key, &browser_pref)) |
| 740 return false; | 734 return false; |
| 741 | 735 |
| 742 PreferenceAPI::Get(profile())->RemoveExtensionControlledPref( | 736 PreferenceAPI::Get(profile())->RemoveExtensionControlledPref( |
| 743 extension_id(), browser_pref, scope); | 737 extension_id(), browser_pref, scope); |
| 744 return true; | 738 return true; |
| 745 } | 739 } |
| 746 | 740 |
| 747 } // namespace extensions | 741 } // namespace extensions |
| OLD | NEW |