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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_ui.cc

Issue 10456017: Add WebsiteSettingsUI for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments (Finnur) Created 8 years, 6 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
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/ui/website_settings/website_settings_ui.h" 5 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
6 6
7 #include "grit/generated_resources.h"
8
7 WebsiteSettingsUI::CookieInfo::CookieInfo() 9 WebsiteSettingsUI::CookieInfo::CookieInfo()
8 : allowed(-1), blocked(-1) { 10 : allowed(-1), blocked(-1) {
9 } 11 }
10 12
11 WebsiteSettingsUI::PermissionInfo::PermissionInfo() 13 WebsiteSettingsUI::PermissionInfo::PermissionInfo()
12 : type(CONTENT_SETTINGS_TYPE_DEFAULT), 14 : type(CONTENT_SETTINGS_TYPE_DEFAULT),
13 setting(CONTENT_SETTING_DEFAULT), 15 setting(CONTENT_SETTING_DEFAULT),
14 default_setting(CONTENT_SETTING_DEFAULT) { 16 default_setting(CONTENT_SETTING_DEFAULT) {
15 } 17 }
16 18
17 WebsiteSettingsUI::IdentityInfo::IdentityInfo() 19 WebsiteSettingsUI::IdentityInfo::IdentityInfo()
18 : identity_status(WebsiteSettings::SITE_IDENTITY_STATUS_UNKNOWN), 20 : identity_status(WebsiteSettings::SITE_IDENTITY_STATUS_UNKNOWN),
19 cert_id(0), 21 cert_id(0),
20 connection_status(WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN) { 22 connection_status(WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN) {
21 } 23 }
22 24
25 int WebsiteSettingsUI::PermissionTypeToUIStringID(ContentSettingsType type) {
tfarina 2012/06/06 17:02:20 // static
markusheintz_ 2012/06/07 20:10:38 Done.
26 switch (type) {
27 case CONTENT_SETTINGS_TYPE_POPUPS:
28 return IDS_WEBSITE_SETTINGS_TYPE_POPUPS;
29 case CONTENT_SETTINGS_TYPE_PLUGINS:
30 return IDS_WEBSITE_SETTINGS_TYPE_PLUGINS;
31 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
32 return IDS_WEBSITE_SETTINGS_TYPE_LOCATION;
33 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
34 return IDS_WEBSITE_SETTINGS_TYPE_NOTIFICATIONS;
35 default:
36 NOTREACHED();
37 return -1;
38 }
39 }
40
41 // static
42 int WebsiteSettingsUI::PermissionValueToUIStringID(ContentSetting value) {
43 switch (value) {
44 case CONTENT_SETTING_ALLOW:
45 return IDS_WEBSITE_SETTINGS_PERMISSION_ALLOW;
46 case CONTENT_SETTING_BLOCK:
47 return IDS_WEBSITE_SETTINGS_PERMISSION_BLOCK;
48 case CONTENT_SETTING_ASK:
49 return IDS_WEBSITE_SETTINGS_PERMISSION_ASK;
50 default:
51 NOTREACHED();
52 return -1;
53 }
54 }
55
23 WebsiteSettingsUI::~WebsiteSettingsUI() { 56 WebsiteSettingsUI::~WebsiteSettingsUI() {
24 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698