| OLD | NEW | 
|     1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |     1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
      e-loading |     5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
      e-loading | 
|     6  |     6  | 
|     7 #include "content/browser/renderer_host/resource_dispatcher_host.h" |     7 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 
|     8  |     8  | 
|     9 #include <set> |     9 #include <set> | 
|    10 #include <vector> |    10 #include <vector> | 
| (...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1580 static int GetCertID(net::URLRequest* request, int child_id) { |  1580 static int GetCertID(net::URLRequest* request, int child_id) { | 
|  1581   if (request->ssl_info().cert) { |  1581   if (request->ssl_info().cert) { | 
|  1582     return CertStore::GetInstance()->StoreCert(request->ssl_info().cert, |  1582     return CertStore::GetInstance()->StoreCert(request->ssl_info().cert, | 
|  1583                                                child_id); |  1583                                                child_id); | 
|  1584   } |  1584   } | 
|  1585   return 0; |  1585   return 0; | 
|  1586 } |  1586 } | 
|  1587  |  1587  | 
|  1588 void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request, |  1588 void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request, | 
|  1589                                                    int child_id) { |  1589                                                    int child_id) { | 
 |  1590   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 
|  1590   // Notify the observers on the IO thread. |  1591   // Notify the observers on the IO thread. | 
|  1591   FOR_EACH_OBSERVER(Observer, observer_list_, OnRequestStarted(this, request)); |  1592   FOR_EACH_OBSERVER(Observer, observer_list_, OnRequestStarted(this, request)); | 
|  1592  |  1593  | 
|  1593   int render_process_id, render_view_id; |  1594   int render_process_id, render_view_id; | 
|  1594   if (!RenderViewForRequest(request, &render_process_id, &render_view_id)) |  1595   if (!RenderViewForRequest(request, &render_process_id, &render_view_id)) | 
|  1595     return; |  1596     return; | 
|  1596  |  1597  | 
|  1597   // Notify the observers on the UI thread. |  1598   // Notify the observers on the UI thread. | 
|  1598   ResourceRequestDetails* detail = new ResourceRequestDetails( |  1599   ResourceRequestDetails* detail = new ResourceRequestDetails( | 
|  1599       request, GetCertID(request, child_id)); |  1600       request, GetCertID(request, child_id)); | 
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1948   return is_prefetch_enabled_; |  1949   return is_prefetch_enabled_; | 
|  1949 } |  1950 } | 
|  1950  |  1951  | 
|  1951 // static |  1952 // static | 
|  1952 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { |  1953 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { | 
|  1953   is_prefetch_enabled_ = value; |  1954   is_prefetch_enabled_ = value; | 
|  1954 } |  1955 } | 
|  1955  |  1956  | 
|  1956 // static |  1957 // static | 
|  1957 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; |  1958 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; | 
| OLD | NEW |