[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / content / child / web_url_loader_impl.h
blob01e65b81e9e338d8bc61a7c504347aa19964ad11
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h"
11 #include "third_party/WebKit/public/platform/WebURLLoader.h"
13 namespace content {
15 class ResourceDispatcher;
16 struct ResourceResponseInfo;
18 class CONTENT_EXPORT WebURLLoaderImpl
19 : public NON_EXPORTED_BASE(blink::WebURLLoader) {
20 public:
21 explicit WebURLLoaderImpl(ResourceDispatcher* resource_dispatcher);
22 virtual ~WebURLLoaderImpl();
24 static blink::WebURLError CreateError(const blink::WebURL& unreachable_url,
25 bool stale_copy_in_cache,
26 int reason);
27 static void PopulateURLResponse(
28 const GURL& url,
29 const ResourceResponseInfo& info,
30 blink::WebURLResponse* response);
32 // WebURLLoader methods:
33 virtual void loadSynchronously(
34 const blink::WebURLRequest& request,
35 blink::WebURLResponse& response,
36 blink::WebURLError& error,
37 blink::WebData& data) OVERRIDE;
38 virtual void loadAsynchronously(
39 const blink::WebURLRequest& request,
40 blink::WebURLLoaderClient* client) OVERRIDE;
41 virtual void cancel() OVERRIDE;
42 virtual void setDefersLoading(bool value) OVERRIDE;
43 virtual void didChangePriority(blink::WebURLRequest::Priority new_priority,
44 int intra_priority_value) OVERRIDE;
45 virtual bool attachThreadedDataReceiver(
46 blink::WebThreadedDataReceiver* threaded_data_receiver) OVERRIDE;
48 private:
49 class Context;
50 scoped_refptr<Context> context_;
52 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl);
55 } // namespace content
57 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_