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

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: " 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
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | 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) 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
23 WebsiteSettingsUI::~WebsiteSettingsUI() { 25 WebsiteSettingsUI::~WebsiteSettingsUI() {
24 } 26 }
27
28 // static
29 int WebsiteSettingsUI::PermissionTypeToUIStringID(ContentSettingsType type) {
30 switch (type) {
31 case CONTENT_SETTINGS_TYPE_POPUPS:
32 return IDS_WEBSITE_SETTINGS_TYPE_POPUPS;
33 case CONTENT_SETTINGS_TYPE_PLUGINS:
34 return IDS_WEBSITE_SETTINGS_TYPE_PLUGINS;
35 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
36 return IDS_WEBSITE_SETTINGS_TYPE_LOCATION;
37 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
38 return IDS_WEBSITE_SETTINGS_TYPE_NOTIFICATIONS;
39 default:
40 NOTREACHED();
41 return -1;
42 }
43 }
44
45 // static
46 int WebsiteSettingsUI::PermissionValueToUIStringID(ContentSetting value) {
47 switch (value) {
48 case CONTENT_SETTING_ALLOW:
49 return IDS_WEBSITE_SETTINGS_PERMISSION_ALLOW;
50 case CONTENT_SETTING_BLOCK:
51 return IDS_WEBSITE_SETTINGS_PERMISSION_BLOCK;
52 case CONTENT_SETTING_ASK:
53 return IDS_WEBSITE_SETTINGS_PERMISSION_ASK;
54 default:
55 NOTREACHED();
56 return -1;
57 }
58 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698