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

Side by Side Diff: chrome/browser/renderer_host/offline_resource_handler.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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) 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 #include "chrome/browser/renderer_host/offline_resource_handler.h" 5 #include "chrome/browser/renderer_host/offline_resource_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "chrome/browser/chromeos/offline/offline_load_page.h" 14 #include "chrome/browser/chromeos/offline/offline_load_page.h"
15 #include "chrome/browser/net/chrome_url_request_context.h" 15 #include "chrome/browser/net/chrome_url_request_context.h"
16 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
17 #include "content/browser/appcache/chrome_appcache_service.h" 17 #include "content/browser/appcache/chrome_appcache_service.h"
18 #include "content/browser/renderer_host/render_view_host.h" 18 #include "content/browser/renderer_host/render_view_host.h"
19 #include "content/browser/renderer_host/resource_dispatcher_host.h" 19 #include "content/browser/renderer_host/resource_dispatcher_host.h"
20 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" 20 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "net/base/net_errors.h" 22 #include "net/base/net_errors.h"
23 #include "net/base/network_change_notifier.h" 23 #include "net/base/network_change_notifier.h"
24 #include "net/url_request/url_request.h" 24 #include "net/url_request/url_request.h"
25 #include "net/url_request/url_request_context.h" 25 #include "net/url_request/url_request_context.h"
26 26
27 using content::BrowserThread;
28
27 OfflineResourceHandler::OfflineResourceHandler( 29 OfflineResourceHandler::OfflineResourceHandler(
28 ResourceHandler* handler, 30 ResourceHandler* handler,
29 int host_id, 31 int host_id,
30 int route_id, 32 int route_id,
31 ResourceDispatcherHost* rdh, 33 ResourceDispatcherHost* rdh,
32 net::URLRequest* request, 34 net::URLRequest* request,
33 ChromeAppCacheService* appcache_service) 35 ChromeAppCacheService* appcache_service)
34 : next_handler_(handler), 36 : next_handler_(handler),
35 process_host_id_(host_id), 37 process_host_id_(host_id),
36 render_view_id_(route_id), 38 render_view_id_(route_id),
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 TabContents* tab_contents = render_view_host ? 205 TabContents* tab_contents = render_view_host ?
204 render_view_host->delegate()->GetAsTabContents() : NULL; 206 render_view_host->delegate()->GetAsTabContents() : NULL;
205 // There is a chance that the tab closed after we decided to show 207 // There is a chance that the tab closed after we decided to show
206 // the offline page on the IO thread and before we actually show the 208 // the offline page on the IO thread and before we actually show the
207 // offline page here on the UI thread. 209 // offline page here on the UI thread.
208 if (tab_contents) 210 if (tab_contents)
209 (new chromeos::OfflineLoadPage(tab_contents, deferred_url_, this))-> 211 (new chromeos::OfflineLoadPage(tab_contents, deferred_url_, this))->
210 Show(); 212 Show();
211 } 213 }
212 } 214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698