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

Side by Side Diff: content/browser/appcache/appcache_update_job.h

Issue 579593003: Cancel AppCache manifest requests on any SSL error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | content/browser/appcache/appcache_update_job.cc » ('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 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "content/browser/appcache/appcache.h" 17 #include "content/browser/appcache/appcache.h"
18 #include "content/browser/appcache/appcache_host.h" 18 #include "content/browser/appcache/appcache_host.h"
19 #include "content/browser/appcache/appcache_response.h" 19 #include "content/browser/appcache/appcache_response.h"
20 #include "content/browser/appcache/appcache_service_impl.h" 20 #include "content/browser/appcache/appcache_service_impl.h"
21 #include "content/browser/appcache/appcache_storage.h" 21 #include "content/browser/appcache/appcache_storage.h"
22 #include "content/common/appcache_interfaces.h" 22 #include "content/common/appcache_interfaces.h"
23 #include "content/common/content_export.h" 23 #include "content/common/content_export.h"
24 #include "net/base/completion_callback.h" 24 #include "net/base/completion_callback.h"
25 #include "net/http/http_response_headers.h" 25 #include "net/http/http_response_headers.h"
26 #include "net/url_request/url_request.h" 26 #include "net/url_request/url_request.h"
27 #include "url/gurl.h" 27 #include "url/gurl.h"
28 28
29 namespace net {
30 class SSLInfo;
31 }
32
29 namespace content { 33 namespace content {
30 FORWARD_DECLARE_TEST(AppCacheGroupTest, QueueUpdate); 34 FORWARD_DECLARE_TEST(AppCacheGroupTest, QueueUpdate);
31 class AppCacheGroupTest; 35 class AppCacheGroupTest;
32 class AppCacheUpdateJobTest; 36 class AppCacheUpdateJobTest;
33 class HostNotifier; 37 class HostNotifier;
34 38
35 // Application cache Update algorithm and state. 39 // Application cache Update algorithm and state.
36 class CONTENT_EXPORT AppCacheUpdateJob 40 class CONTENT_EXPORT AppCacheUpdateJob
37 : public AppCacheStorage::Delegate, 41 : public AppCacheStorage::Delegate,
38 public AppCacheHost::Observer, 42 public AppCacheHost::Observer,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 int redirect_response_code() const { return redirect_response_code_; } 137 int redirect_response_code() const { return redirect_response_code_; }
134 138
135 private: 139 private:
136 // URLRequest::Delegate overrides 140 // URLRequest::Delegate overrides
137 virtual void OnReceivedRedirect(net::URLRequest* request, 141 virtual void OnReceivedRedirect(net::URLRequest* request,
138 const net::RedirectInfo& redirect_info, 142 const net::RedirectInfo& redirect_info,
139 bool* defer_redirect) OVERRIDE; 143 bool* defer_redirect) OVERRIDE;
140 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; 144 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
141 virtual void OnReadCompleted(net::URLRequest* request, 145 virtual void OnReadCompleted(net::URLRequest* request,
142 int bytes_read) OVERRIDE; 146 int bytes_read) OVERRIDE;
147 virtual void OnSSLCertificateError(net::URLRequest* request,
148 const net::SSLInfo& ssl_info,
149 bool fatal) OVERRIDE;
143 150
144 void AddConditionalHeaders(const net::HttpResponseHeaders* headers); 151 void AddConditionalHeaders(const net::HttpResponseHeaders* headers);
145 void OnWriteComplete(int result); 152 void OnWriteComplete(int result);
146 void ReadResponseData(); 153 void ReadResponseData();
147 bool ConsumeResponseData(int bytes_read); 154 bool ConsumeResponseData(int bytes_read);
148 void OnResponseCompleted(); 155 void OnResponseCompleted();
149 bool MaybeRetryRequest(); 156 bool MaybeRetryRequest();
150 157
151 GURL url_; 158 GURL url_;
152 AppCacheUpdateJob* job_; 159 AppCacheUpdateJob* job_;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 AppCacheStorage* storage_; 346 AppCacheStorage* storage_;
340 347
341 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate); 348 FRIEND_TEST_ALL_PREFIXES(content::AppCacheGroupTest, QueueUpdate);
342 349
343 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob); 350 DISALLOW_COPY_AND_ASSIGN(AppCacheUpdateJob);
344 }; 351 };
345 352
346 } // namespace content 353 } // namespace content
347 354
348 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_ 355 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_UPDATE_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/appcache/appcache_update_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698