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

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

Issue 2873913002: Implement chrome://network-error with network service. (Closed)
Patch Set: merge 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 // Check if the given integer is a valid network error code.
81 static bool IsValidNetworkErrorCode(int error_code);
82
80 // Returns the schemes that are used by WebUI (i.e. the set from content and 83 // Returns the schemes that are used by WebUI (i.e. the set from content and
81 // its embedder). 84 // its embedder).
82 static std::vector<std::string> GetWebUISchemes(); 85 static std::vector<std::string> GetWebUISchemes();
83 86
84 private: 87 private:
85 friend class URLRequestChromeJob; 88 friend class URLRequestChromeJob;
86 89
87 typedef std::map<std::string, 90 typedef std::map<std::string,
88 scoped_refptr<URLDataSourceImpl> > DataSourceMap; 91 scoped_refptr<URLDataSourceImpl> > DataSourceMap;
89 typedef std::map<RequestID, URLRequestChromeJob*> PendingRequestMap; 92 typedef std::map<RequestID, URLRequestChromeJob*> PendingRequestMap;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 DISALLOW_COPY_AND_ASSIGN(URLDataManagerBackend); 126 DISALLOW_COPY_AND_ASSIGN(URLDataManagerBackend);
124 }; 127 };
125 128
126 // Creates protocol handler for chrome-devtools://. 129 // Creates protocol handler for chrome-devtools://.
127 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler( 130 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler(
128 ResourceContext* resource_context); 131 ResourceContext* resource_context);
129 132
130 } // namespace content 133 } // namespace content
131 134
132 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_ 135 #endif // CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_BACKEND_H_
OLDNEW
« no previous file with comments | « content/browser/webui/network_error_url_loader.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