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

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

Issue 2867853002: Make the new WebUI's code handle all webui schemes, instead of just chrome://. (Closed)
Patch Set: Created 3 years, 7 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
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_WEBUI_URL_DATA_MANAGER_BACKEND_H_ 5 #ifndef CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
6 #define CONTENT_BROWSER_WEBUI_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 <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const std::string& path, 70 const std::string& path,
71 const std::string& origin); 71 const std::string& origin);
72 72
73 // Returns whether |url| passes some sanity checks and is a valid GURL. 73 // Returns whether |url| passes some sanity checks and is a valid GURL.
74 static bool CheckURLIsValid(const GURL& url); 74 static bool CheckURLIsValid(const GURL& url);
75 75
76 // Parse |url| to get the path which will be used to resolve the request. The 76 // Parse |url| to get the path which will be used to resolve the request. The
77 // path is the remaining portion after the scheme and hostname. 77 // path is the remaining portion after the scheme and hostname.
78 static void URLToRequestPath(const GURL& url, std::string* path); 78 static void URLToRequestPath(const GURL& url, std::string* path);
79 79
80 // Returns the schemes that are used by WebUI (i.e. the set from content and
81 // its embedder).
82 static std::vector<std::string> GetWebUISchemes();
83
80 private: 84 private:
81 friend class URLRequestChromeJob; 85 friend class URLRequestChromeJob;
82 86
83 typedef std::map<std::string, 87 typedef std::map<std::string,
84 scoped_refptr<URLDataSourceImpl> > DataSourceMap; 88 scoped_refptr<URLDataSourceImpl> > DataSourceMap;
85 typedef std::map<RequestID, URLRequestChromeJob*> PendingRequestMap; 89 typedef std::map<RequestID, URLRequestChromeJob*> PendingRequestMap;
86 90
87 // Called by the job when it's starting up. 91 // Called by the job when it's starting up.
88 // Returns false if |url| is not a URL managed by this object. 92 // Returns false if |url| is not a URL managed by this object.
89 bool StartRequest(const net::URLRequest* request, URLRequestChromeJob* job); 93 bool StartRequest(const net::URLRequest* request, URLRequestChromeJob* job);
(...skipping 29 matching lines...) Expand all
119 DISALLOW_COPY_AND_ASSIGN(URLDataManagerBackend); 123 DISALLOW_COPY_AND_ASSIGN(URLDataManagerBackend);
120 }; 124 };
121 125
122 // Creates protocol handler for chrome-devtools://. 126 // Creates protocol handler for chrome-devtools://.
123 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler( 127 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler(
124 ResourceContext* resource_context); 128 ResourceContext* resource_context);
125 129
126 } // namespace content 130 } // namespace content
127 131
128 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ 132 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl_map.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