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

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

Issue 516703002: Replaced the current WebsiteSettings dialog with a new PageInfo dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed changes to chromium_strings Created 6 years, 2 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/ui/website_settings/website_settings_ui.h" 5 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
6 6
7 #include "chrome/grit/generated_resources.h" 7 #include "grit/chromium_strings.h"
Lei Zhang 2014/10/07 23:30:31 Please use chrome/grit.
sashab 2014/10/08 00:04:21 Sure, I didn't know this was a thing. Updated all
8 #include "grit/generated_resources.h"
8 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
11 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
12 13
13 namespace { 14 namespace {
14 15
15 const int kInvalidResourceID = -1; 16 const int kInvalidResourceID = -1;
16 17
17 // The resource id's for the strings that are displayed on the permissions 18 // The resource id's for the strings that are displayed on the permissions
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 // the first time. 330 // the first time.
330 return IDR_PAGEINFO_INFO; 331 return IDR_PAGEINFO_INFO;
331 } 332 }
332 333
333 // static 334 // static
334 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon( 335 const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon(
335 const base::string16& first_visit) { 336 const base::string16& first_visit) {
336 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 337 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
337 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit)); 338 return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit));
338 } 339 }
340
341 // static
342 int WebsiteSettingsUI::GetConnectionSummaryMessageID(
343 WebsiteSettings::SiteConnectionStatus status) {
344 switch (status) {
345 case WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN:
346 return IDS_PAGE_INFO_UNENCRYPTED_CONNECTION_SUMMARY_TEXT;
347 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED:
348 return IDS_PAGE_INFO_ENCRYPTED_CONNECTION_SUMMARY_TEXT;
349 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_CONTENT:
350 return IDS_PAGE_INFO_MIXED_CONTENT_CONNECTION_SUMMARY_TEXT;
351 case WebsiteSettings::SITE_CONNECTION_STATUS_UNENCRYPTED:
352 return IDS_PAGE_INFO_UNENCRYPTED_CONNECTION_SUMMARY_TEXT;
353 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED_ERROR:
354 return IDS_PAGE_INFO_UNENCRYPTED_CONNECTION_SUMMARY_TEXT;
355 case WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE:
356 return IDS_PAGE_INFO_INTERNAL_PAGE;
357 default:
358 NOTREACHED();
359 return 0;
360 }
361 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698