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

Side by Side Diff: webkit/glue/alt_error_page_resource_fetcher.cc

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « webkit/glue/alt_error_page_resource_fetcher.h ('k') | webkit/glue/chrome_client_impl.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "webkit/glue/alt_error_page_resource_fetcher.h" 5 #include "webkit/glue/alt_error_page_resource_fetcher.h"
6 6
7 #include "webkit/glue/resource_fetcher.h" 7 #include "webkit/glue/resource_fetcher.h"
8 8
9 using WebKit::WebFrame;
9 using WebKit::WebURLError; 10 using WebKit::WebURLError;
10 using WebKit::WebURLResponse; 11 using WebKit::WebURLResponse;
11 12
12 namespace webkit_glue { 13 namespace webkit_glue {
13 14
14 // Number of seconds to wait for the alternate error page server. If it takes 15 // Number of seconds to wait for the alternate error page server. If it takes
15 // too long, just use the local error page. 16 // too long, just use the local error page.
16 static const int kDownloadTimeoutSec = 3; 17 static const int kDownloadTimeoutSec = 3;
17 18
18 AltErrorPageResourceFetcher::AltErrorPageResourceFetcher( 19 AltErrorPageResourceFetcher::AltErrorPageResourceFetcher(
(...skipping 21 matching lines...) Expand all
40 const std::string& data) { 41 const std::string& data) {
41 // A null response indicates a network error. 42 // A null response indicates a network error.
42 if (!response.isNull() && response.httpStatusCode() == 200) { 43 if (!response.isNull() && response.httpStatusCode() == 200) {
43 callback_->Run(frame_, original_error_, data); 44 callback_->Run(frame_, original_error_, data);
44 } else { 45 } else {
45 callback_->Run(frame_, original_error_, std::string()); 46 callback_->Run(frame_, original_error_, std::string());
46 } 47 }
47 } 48 }
48 49
49 } // namespace webkit_glue 50 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/alt_error_page_resource_fetcher.h ('k') | webkit/glue/chrome_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698