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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 7744007: Add missing entry for new content type 'auto-select-certificate' in content_settings_handler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { 55 const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
56 {CONTENT_SETTINGS_TYPE_COOKIES, "cookies"}, 56 {CONTENT_SETTINGS_TYPE_COOKIES, "cookies"},
57 {CONTENT_SETTINGS_TYPE_IMAGES, "images"}, 57 {CONTENT_SETTINGS_TYPE_IMAGES, "images"},
58 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript"}, 58 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript"},
59 {CONTENT_SETTINGS_TYPE_PLUGINS, "plugins"}, 59 {CONTENT_SETTINGS_TYPE_PLUGINS, "plugins"},
60 {CONTENT_SETTINGS_TYPE_POPUPS, "popups"}, 60 {CONTENT_SETTINGS_TYPE_POPUPS, "popups"},
61 {CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"}, 61 {CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"},
62 {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications"}, 62 {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications"},
63 {CONTENT_SETTINGS_TYPE_INTENTS, "intents"}, 63 {CONTENT_SETTINGS_TYPE_INTENTS, "intents"},
64 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"},
battre 2011/08/25 08:15:49 This does not show up in content_settings_types.h
markusheintz_ 2011/08/25 14:39:51 No. The content type is there if you check the cod
64 }; 65 };
battre 2011/08/25 08:15:49 Does it make sense to add COMPILE_ASSERT(arraysize
markusheintz_ 2011/08/25 14:39:51 Absolutely!! Done
65 66
66 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) { 67 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) {
67 for (size_t i = 0; i < arraysize(kContentSettingsTypeGroupNames); ++i) { 68 for (size_t i = 0; i < arraysize(kContentSettingsTypeGroupNames); ++i) {
68 if (name == kContentSettingsTypeGroupNames[i].name) 69 if (name == kContentSettingsTypeGroupNames[i].name)
69 return kContentSettingsTypeGroupNames[i].type; 70 return kContentSettingsTypeGroupNames[i].type;
70 } 71 }
71 72
72 NOTREACHED() << name << " is not a recognized content settings type."; 73 NOTREACHED() << name << " is not a recognized content settings type.";
73 return CONTENT_SETTINGS_TYPE_DEFAULT; 74 return CONTENT_SETTINGS_TYPE_DEFAULT;
74 } 75 }
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry(); 759 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry();
759 } 760 }
760 761
761 HostContentSettingsMap* 762 HostContentSettingsMap*
762 ContentSettingsHandler::GetOTRContentSettingsMap() { 763 ContentSettingsHandler::GetOTRContentSettingsMap() {
763 Profile* profile = Profile::FromWebUI(web_ui_); 764 Profile* profile = Profile::FromWebUI(web_ui_);
764 if (profile->HasOffTheRecordProfile()) 765 if (profile->HasOffTheRecordProfile())
765 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); 766 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap();
766 return NULL; 767 return NULL;
767 } 768 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698