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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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/ssl/ssl_manager.h" 5 #include "chrome/browser/ssl/ssl_manager.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/browser_thread.h" 9 #include "chrome/browser/browser_thread.h"
10 #include "chrome/browser/load_from_memory_cache_details.h" 10 #include "chrome/browser/load_from_memory_cache_details.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 void SSLManager::DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details) { 205 void SSLManager::DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details) {
206 DCHECK(details); 206 DCHECK(details);
207 207
208 // Simulate loading this resource through the usual path. 208 // Simulate loading this resource through the usual path.
209 // Note that we specify SUB_RESOURCE as the resource type as WebCore only 209 // Note that we specify SUB_RESOURCE as the resource type as WebCore only
210 // caches sub-resources. 210 // caches sub-resources.
211 // This resource must have been loaded with no filtering because filtered 211 // This resource must have been loaded with no filtering because filtered
212 // resouces aren't cachable. 212 // resouces aren't cachable.
213 scoped_refptr<SSLRequestInfo> info = new SSLRequestInfo( 213 scoped_refptr<SSLRequestInfo> info(new SSLRequestInfo(
214 details->url(), 214 details->url(),
215 ResourceType::SUB_RESOURCE, 215 ResourceType::SUB_RESOURCE,
216 details->frame_origin(), 216 details->frame_origin(),
217 details->main_frame_origin(), 217 details->main_frame_origin(),
218 details->pid(), 218 details->pid(),
219 details->ssl_cert_id(), 219 details->ssl_cert_id(),
220 details->ssl_cert_status()); 220 details->ssl_cert_status()));
221 221
222 // Simulate loading this resource through the usual path. 222 // Simulate loading this resource through the usual path.
223 policy()->OnRequestStarted(info.get()); 223 policy()->OnRequestStarted(info.get());
224 } 224 }
225 225
226 void SSLManager::DidStartResourceResponse(ResourceRequestDetails* details) { 226 void SSLManager::DidStartResourceResponse(ResourceRequestDetails* details) {
227 DCHECK(details); 227 DCHECK(details);
228 228
229 scoped_refptr<SSLRequestInfo> info = new SSLRequestInfo( 229 scoped_refptr<SSLRequestInfo> info(new SSLRequestInfo(
230 details->url(), 230 details->url(),
231 details->resource_type(), 231 details->resource_type(),
232 details->frame_origin(), 232 details->frame_origin(),
233 details->main_frame_origin(), 233 details->main_frame_origin(),
234 details->origin_child_id(), 234 details->origin_child_id(),
235 details->ssl_cert_id(), 235 details->ssl_cert_id(),
236 details->ssl_cert_status()); 236 details->ssl_cert_status()));
237 237
238 // Notify our policy that we started a resource request. Ideally, the 238 // Notify our policy that we started a resource request. Ideally, the
239 // policy should have the ability to cancel the request, but we can't do 239 // policy should have the ability to cancel the request, but we can't do
240 // that yet. 240 // that yet.
241 policy()->OnRequestStarted(info.get()); 241 policy()->OnRequestStarted(info.get());
242 } 242 }
243 243
244 void SSLManager::DidReceiveResourceRedirect(ResourceRedirectDetails* details) { 244 void SSLManager::DidReceiveResourceRedirect(ResourceRedirectDetails* details) {
245 // TODO(abarth): Make sure our redirect behavior is correct. If we ever see a 245 // TODO(abarth): Make sure our redirect behavior is correct. If we ever see a
246 // non-HTTPS resource in the redirect chain, we want to trigger 246 // non-HTTPS resource in the redirect chain, we want to trigger
(...skipping 16 matching lines...) Expand all
263 263
264 policy()->UpdateEntry(entry, controller_->tab_contents()); 264 policy()->UpdateEntry(entry, controller_->tab_contents());
265 265
266 if (!entry->ssl().Equals(original_ssl_status)) { 266 if (!entry->ssl().Equals(original_ssl_status)) {
267 NotificationService::current()->Notify( 267 NotificationService::current()->Notify(
268 NotificationType::SSL_VISIBLE_STATE_CHANGED, 268 NotificationType::SSL_VISIBLE_STATE_CHANGED,
269 Source<NavigationController>(controller_), 269 Source<NavigationController>(controller_),
270 NotificationService::NoDetails()); 270 NotificationService::NoDetails());
271 } 271 }
272 } 272 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_host_state_unittest.cc ('k') | chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698