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

Side by Side Diff: chrome/browser/extensions/api/preference/preference_api.cc

Issue 290123003: Exposes passwordSavingEnabled API from chrome privacy preference extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 "Internal error: Stored value for preference '*' cannot be converted " 65 "Internal error: Stored value for preference '*' cannot be converted "
66 "properly."; 66 "properly.";
67 67
68 PrefMappingEntry kPrefMapping[] = { 68 PrefMappingEntry kPrefMapping[] = {
69 {"protectedContentEnabled", prefs::kEnableDRM, APIPermission::kPrivacy, 69 {"protectedContentEnabled", prefs::kEnableDRM, APIPermission::kPrivacy,
70 APIPermission::kPrivacy}, 70 APIPermission::kPrivacy},
71 {"alternateErrorPagesEnabled", prefs::kAlternateErrorPagesEnabled, 71 {"alternateErrorPagesEnabled", prefs::kAlternateErrorPagesEnabled,
72 APIPermission::kPrivacy, APIPermission::kPrivacy}, 72 APIPermission::kPrivacy, APIPermission::kPrivacy},
73 {"autofillEnabled", autofill::prefs::kAutofillEnabled, 73 {"autofillEnabled", autofill::prefs::kAutofillEnabled,
74 APIPermission::kPrivacy, APIPermission::kPrivacy}, 74 APIPermission::kPrivacy, APIPermission::kPrivacy},
75 {"passwordManagerEnabled", password_manager::prefs::kPasswordManagerEnabled,
Bernhard Bauer 2014/05/19 11:32:07 These should be sorted by the first term, i.e. thi
76 APIPermission::kPrivacy, APIPermission::kPrivacy},
75 {"hyperlinkAuditingEnabled", prefs::kEnableHyperlinkAuditing, 77 {"hyperlinkAuditingEnabled", prefs::kEnableHyperlinkAuditing,
76 APIPermission::kPrivacy, APIPermission::kPrivacy}, 78 APIPermission::kPrivacy, APIPermission::kPrivacy},
77 {"networkPredictionEnabled", prefs::kNetworkPredictionEnabled, 79 {"networkPredictionEnabled", prefs::kNetworkPredictionEnabled,
78 APIPermission::kPrivacy, APIPermission::kPrivacy}, 80 APIPermission::kPrivacy, APIPermission::kPrivacy},
79 {"proxy", prefs::kProxy, APIPermission::kProxy, APIPermission::kProxy}, 81 {"proxy", prefs::kProxy, APIPermission::kProxy, APIPermission::kProxy},
80 {"referrersEnabled", prefs::kEnableReferrers, APIPermission::kPrivacy, 82 {"referrersEnabled", prefs::kEnableReferrers, APIPermission::kPrivacy,
81 APIPermission::kPrivacy}, 83 APIPermission::kPrivacy},
82 {"safeBrowsingEnabled", prefs::kSafeBrowsingEnabled, 84 {"safeBrowsingEnabled", prefs::kSafeBrowsingEnabled,
83 APIPermission::kPrivacy, APIPermission::kPrivacy}, 85 APIPermission::kPrivacy, APIPermission::kPrivacy},
84 {"searchSuggestEnabled", prefs::kSearchSuggestEnabled, 86 {"searchSuggestEnabled", prefs::kSearchSuggestEnabled,
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 pref_key, PreferenceFunction::PERMISSION_TYPE_WRITE, &browser_pref)) { 707 pref_key, PreferenceFunction::PERMISSION_TYPE_WRITE, &browser_pref)) {
706 return false; 708 return false;
707 } 709 }
708 710
709 PreferenceAPI::Get(GetProfile()) 711 PreferenceAPI::Get(GetProfile())
710 ->RemoveExtensionControlledPref(extension_id(), browser_pref, scope); 712 ->RemoveExtensionControlledPref(extension_id(), browser_pref, scope);
711 return true; 713 return true;
712 } 714 }
713 715
714 } // namespace extensions 716 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698