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

Side by Side Diff: content/browser/webui/url_data_manager_backend.h

Issue 12049052: Move core url data manager classes to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 7 years, 11 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
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 CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_BACKEND_H_ 5 #ifndef CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_BACKEND_H_ 6 #define CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 14 #include "base/supports_user_data.h"
15 #include "content/browser/webui/url_data_manager.h"
15 #include "net/url_request/url_request_job_factory.h" 16 #include "net/url_request/url_request_job_factory.h"
16 17
17 class ChromeURLDataManagerBackend; 18 class ChromeURLDataManagerBackend;
18 class GURL; 19 class GURL;
19 class URLRequestChromeJob; 20 class URLRequestChromeJob;
20 21
21 namespace base { 22 namespace base {
22 class RefCountedMemory; 23 class RefCountedMemory;
23 } 24 }
24 25
25 namespace net { 26 namespace net {
26 class NetworkDelegate;
27 class URLRequest; 27 class URLRequest;
28 class URLRequestJob; 28 class URLRequestJob;
29 } 29 }
30 30
31 // ChromeURLDataManagerBackend is used internally by ChromeURLDataManager on the 31 // ChromeURLDataManagerBackend is used internally by ChromeURLDataManager on the
32 // IO thread. In most cases you can use the API in ChromeURLDataManager and 32 // IO thread. In most cases you can use the API in ChromeURLDataManager and
33 // ignore this class. ChromeURLDataManagerBackend is owned by 33 // ignore this class. ChromeURLDataManagerBackend is owned by
34 // ChromeURLRequestContext. 34 // ChromeURLRequestContext.
35 class ChromeURLDataManagerBackend { 35 class ChromeURLDataManagerBackend : public base::SupportsUserData::Data {
36 public: 36 public:
37 typedef int RequestID; 37 typedef int RequestID;
38 38
39 ChromeURLDataManagerBackend(); 39 ChromeURLDataManagerBackend();
40 ~ChromeURLDataManagerBackend(); 40 virtual ~ChromeURLDataManagerBackend();
41 41
42 // Invoked to create the protocol handler for chrome://. |is_incognito| should 42 // Invoked to create the protocol handler for chrome://. |is_incognito| should
43 // be set for incognito profiles. 43 // be set for incognito profiles.
44 static net::URLRequestJobFactory::ProtocolHandler* CreateProtocolHandler( 44 static net::URLRequestJobFactory::ProtocolHandler* CreateProtocolHandler(
45 ChromeURLDataManagerBackend* backend, 45 ChromeURLDataManagerBackend* backend,
46 bool is_incognito); 46 bool is_incognito);
47 47
48 // Adds a DataSource to the collection of data sources. 48 // Adds a DataSource to the collection of data sources.
49 void AddDataSource(URLDataSourceImpl* source); 49 void AddDataSource(URLDataSourceImpl* source);
50 50
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // The ID we'll use for the next request we receive. 92 // The ID we'll use for the next request we receive.
93 RequestID next_request_id_; 93 RequestID next_request_id_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManagerBackend); 95 DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManagerBackend);
96 }; 96 };
97 97
98 // Creates protocol handler for chrome-devtools://. |is_incognito| should be 98 // Creates protocol handler for chrome-devtools://. |is_incognito| should be
99 // set for incognito profiles. 99 // set for incognito profiles.
100 net::URLRequestJobFactory::ProtocolHandler* 100 net::URLRequestJobFactory::ProtocolHandler*
101 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend, 101 CreateDevToolsProtocolHandler(ChromeURLDataManagerBackend* backend,
102 net::NetworkDelegate* network_delegate,
103 bool is_incognito); 102 bool is_incognito);
104 103
105 #endif // CHROME_BROWSER_UI_WEBUI_CHROME_URL_DATA_MANAGER_BACKEND_H_ 104 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
OLDNEW
« no previous file with comments | « content/browser/webui/url_data_manager.cc ('k') | content/browser/webui/url_data_manager_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698