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

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

Issue 118145: Remove the obsolete TabContents::GetSecurityStyle and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 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/tab_contents/tab_contents.h ('k') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 // Always display a throbber during pending loads. 516 // Always display a throbber during pending loads.
517 if (controller_.GetLastCommittedEntry() && controller_.pending_entry()) 517 if (controller_.GetLastCommittedEntry() && controller_.pending_entry())
518 return true; 518 return true;
519 519
520 DOMUI* dom_ui = GetDOMUIForCurrentState(); 520 DOMUI* dom_ui = GetDOMUIForCurrentState();
521 if (dom_ui) 521 if (dom_ui)
522 return !dom_ui->hide_favicon(); 522 return !dom_ui->hide_favicon();
523 return true; 523 return true;
524 } 524 }
525 525
526 #if defined(OS_WIN)
527 SecurityStyle TabContents::GetSecurityStyle() const {
528 // We may not have a navigation entry yet.
529 NavigationEntry* entry = controller_.GetActiveEntry();
530 return entry ? entry->ssl().security_style() : SECURITY_STYLE_UNKNOWN;
531 }
532
533 bool TabContents::GetSSLEVText(std::wstring* ev_text,
534 std::wstring* ev_tooltip_text) const {
535 DCHECK(ev_text && ev_tooltip_text);
536 ev_text->clear();
537 ev_tooltip_text->clear();
538
539 NavigationEntry* entry = controller_.GetActiveEntry();
540 if (!entry ||
541 net::IsCertStatusError(entry->ssl().cert_status()) ||
542 ((entry->ssl().cert_status() & net::CERT_STATUS_IS_EV) == 0))
543 return false;
544
545 scoped_refptr<net::X509Certificate> cert;
546 CertStore::GetSharedInstance()->RetrieveCert(entry->ssl().cert_id(), &cert);
547 if (!cert.get()) {
548 NOTREACHED();
549 return false;
550 }
551
552 return SSLManager::GetEVCertNames(*cert, ev_text, ev_tooltip_text);
553 }
554 #endif
555
556 std::wstring TabContents::GetStatusText() const { 526 std::wstring TabContents::GetStatusText() const {
557 if (!is_loading() || load_state_ == net::LOAD_STATE_IDLE) 527 if (!is_loading() || load_state_ == net::LOAD_STATE_IDLE)
558 return std::wstring(); 528 return std::wstring();
559 529
560 switch (load_state_) { 530 switch (load_state_) {
561 case net::LOAD_STATE_WAITING_FOR_CACHE: 531 case net::LOAD_STATE_WAITING_FOR_CACHE:
562 return l10n_util::GetString(IDS_LOAD_STATE_WAITING_FOR_CACHE); 532 return l10n_util::GetString(IDS_LOAD_STATE_WAITING_FOR_CACHE);
563 case net::LOAD_STATE_RESOLVING_PROXY_FOR_URL: 533 case net::LOAD_STATE_RESOLVING_PROXY_FOR_URL:
564 return l10n_util::GetString(IDS_LOAD_STATE_RESOLVING_PROXY_FOR_URL); 534 return l10n_util::GetString(IDS_LOAD_STATE_RESOLVING_PROXY_FOR_URL);
565 case net::LOAD_STATE_RESOLVING_HOST: 535 case net::LOAD_STATE_RESOLVING_HOST:
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 NavigationController::LoadCommittedDetails& committed_details = 2330 NavigationController::LoadCommittedDetails& committed_details =
2361 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); 2331 *(Details<NavigationController::LoadCommittedDetails>(details).ptr());
2362 ExpireInfoBars(committed_details); 2332 ExpireInfoBars(committed_details);
2363 break; 2333 break;
2364 } 2334 }
2365 2335
2366 default: 2336 default:
2367 NOTREACHED(); 2337 NOTREACHED();
2368 } 2338 }
2369 } 2339 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698