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

Side by Side Diff: chrome/browser/page_info_model.cc

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/page_info_model.h" 5 #include "chrome/browser/page_info_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 // Some of what IsCertStatusError classifies as errors we want to show as 54 // Some of what IsCertStatusError classifies as errors we want to show as
55 // warnings instead. 55 // warnings instead.
56 static const int cert_warnings = 56 static const int cert_warnings =
57 net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION | 57 net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION |
58 net::CERT_STATUS_NO_REVOCATION_MECHANISM; 58 net::CERT_STATUS_NO_REVOCATION_MECHANISM;
59 int status_with_warnings_removed = ssl.cert_status() & ~cert_warnings; 59 int status_with_warnings_removed = ssl.cert_status() & ~cert_warnings;
60 60
61 if (ssl.cert_id() && 61 if (ssl.cert_id() &&
62 CertStore::GetSharedInstance()->RetrieveCert(ssl.cert_id(), &cert) && 62 CertStore::GetInstance()->RetrieveCert(ssl.cert_id(), &cert) &&
63 !net::IsCertStatusError(status_with_warnings_removed)) { 63 !net::IsCertStatusError(status_with_warnings_removed)) {
64 // No error found so far, check cert_status warnings. 64 // No error found so far, check cert_status warnings.
65 int cert_status = ssl.cert_status(); 65 int cert_status = ssl.cert_status();
66 if (cert_status & cert_warnings) { 66 if (cert_status & cert_warnings) {
67 string16 issuer_name(UTF8ToUTF16(cert->issuer().GetDisplayName())); 67 string16 issuer_name(UTF8ToUTF16(cert->issuer().GetDisplayName()));
68 if (issuer_name.empty()) { 68 if (issuer_name.empty()) {
69 issuer_name.assign(l10n_util::GetStringUTF16( 69 issuer_name.assign(l10n_util::GetStringUTF16(
70 IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY)); 70 IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY));
71 } 71 }
72 description.assign(l10n_util::GetStringFUTF16( 72 description.assign(l10n_util::GetStringFUTF16(
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 gfx::NativeImage PageInfoModel::GetBitmapNamed(int resource_id) { 352 gfx::NativeImage PageInfoModel::GetBitmapNamed(int resource_id) {
353 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 353 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
354 gfx::NativeImage image = rb.GetNativeImageNamed(resource_id); 354 gfx::NativeImage image = rb.GetNativeImageNamed(resource_id);
355 #if defined(OS_MACOSX) 355 #if defined(OS_MACOSX)
356 // Unlike other platforms, the Mac ResourceBundle does not keep a shared image 356 // Unlike other platforms, the Mac ResourceBundle does not keep a shared image
357 // cache. These are released in the dtor. 357 // cache. These are released in the dtor.
358 mac_util::NSObjectRetain(image); 358 mac_util::NSObjectRetain(image);
359 #endif 359 #endif
360 return image; 360 return image;
361 } 361 }
OLDNEW
« no previous file with comments | « chrome/browser/net/metadata_url_request.cc ('k') | chrome/browser/parsers/metadata_parser_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698