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

Side by Side Diff: content/browser/ssl/ssl_manager.cc

Issue 10038026: TabContents -> WebContentsImpl, part 12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: *web*contents Created 8 years, 8 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 | « no previous file | content/browser/web_contents/interstitial_page_impl.h » ('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 "content/browser/ssl/ssl_manager.h" 5 #include "content/browser/ssl/ssl_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/browser/load_from_memory_cache_details.h" 9 #include "content/browser/load_from_memory_cache_details.h"
10 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" 10 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 SSLManager::SSLManager(NavigationControllerImpl* controller) 80 SSLManager::SSLManager(NavigationControllerImpl* controller)
81 : backend_(controller), 81 : backend_(controller),
82 policy_(new SSLPolicy(&backend_)), 82 policy_(new SSLPolicy(&backend_)),
83 controller_(controller) { 83 controller_(controller) {
84 DCHECK(controller_); 84 DCHECK(controller_);
85 85
86 // Subscribe to various notifications. 86 // Subscribe to various notifications.
87 registrar_.Add( 87 registrar_.Add(
88 this, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED, 88 this, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED,
89 content::Source<WebContents>(controller_->tab_contents())); 89 content::Source<WebContents>(controller_->web_contents()));
90 registrar_.Add( 90 registrar_.Add(
91 this, content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT, 91 this, content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT,
92 content::Source<WebContents>(controller_->tab_contents())); 92 content::Source<WebContents>(controller_->web_contents()));
93 registrar_.Add( 93 registrar_.Add(
94 this, content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, 94 this, content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE,
95 content::Source<NavigationController>(controller_)); 95 content::Source<NavigationController>(controller_));
96 registrar_.Add( 96 registrar_.Add(
97 this, content::NOTIFICATION_SSL_INTERNAL_STATE_CHANGED, 97 this, content::NOTIFICATION_SSL_INTERNAL_STATE_CHANGED,
98 content::Source<content::BrowserContext>( 98 content::Source<content::BrowserContext>(
99 controller_->GetBrowserContext())); 99 controller_->GetBrowserContext()));
100 } 100 }
101 101
102 SSLManager::~SSLManager() { 102 SSLManager::~SSLManager() {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 213
214 void SSLManager::UpdateEntry(NavigationEntryImpl* entry) { 214 void SSLManager::UpdateEntry(NavigationEntryImpl* entry) {
215 // We don't always have a navigation entry to update, for example in the 215 // We don't always have a navigation entry to update, for example in the
216 // case of the Web Inspector. 216 // case of the Web Inspector.
217 if (!entry) 217 if (!entry)
218 return; 218 return;
219 219
220 SSLStatus original_ssl_status = entry->GetSSL(); // Copy! 220 SSLStatus original_ssl_status = entry->GetSSL(); // Copy!
221 221
222 policy()->UpdateEntry(entry, controller_->tab_contents()); 222 policy()->UpdateEntry(entry, controller_->web_contents());
223 223
224 if (!entry->GetSSL().Equals(original_ssl_status)) { 224 if (!entry->GetSSL().Equals(original_ssl_status)) {
225 content::NotificationService::current()->Notify( 225 content::NotificationService::current()->Notify(
226 content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, 226 content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
227 content::Source<NavigationController>(controller_), 227 content::Source<NavigationController>(controller_),
228 content::NotificationService::NoDetails()); 228 content::NotificationService::NoDetails());
229 } 229 }
230 } 230 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/interstitial_page_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698