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

Side by Side Diff: content/public/browser/browser_url_handler.h

Issue 923183003: Move URL fixup to a preliminary phase that doesn't affect virtual URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid duplicate code Created 5 years, 10 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
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PUBLIC_BROWSER_BROWSER_URL_HANDLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_URL_HANDLER_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_URL_HANDLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_URL_HANDLER_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 class GURL; 10 class GURL;
(...skipping 25 matching lines...) Expand all
36 static BrowserURLHandler* GetInstance(); 36 static BrowserURLHandler* GetInstance();
37 37
38 // RewriteURLIfNecessary gives all registered URLHandlers a shot at processing 38 // RewriteURLIfNecessary gives all registered URLHandlers a shot at processing
39 // the given URL, and modifies it in place. 39 // the given URL, and modifies it in place.
40 // If the original URL needs to be adjusted if the modified URL is redirected, 40 // If the original URL needs to be adjusted if the modified URL is redirected,
41 // this function sets |reverse_on_redirect| to true. 41 // this function sets |reverse_on_redirect| to true.
42 virtual void RewriteURLIfNecessary(GURL* url, 42 virtual void RewriteURLIfNecessary(GURL* url,
43 BrowserContext* browser_context, 43 BrowserContext* browser_context,
44 bool* reverse_on_redirect) = 0; 44 bool* reverse_on_redirect) = 0;
45 45
46 // Set the specified handler as a preliminary fixup phase to be done before
47 // rewriting. This allows minor cleanup for the URL without having it affect
48 // the virtual URL.
49 virtual void SetFixupHandler(URLHandler handler) = 0;
50
46 // Add the specified handler pair to the list of URL handlers. 51 // Add the specified handler pair to the list of URL handlers.
47 // 52 //
48 // Note that normally, the reverse handler is only used if the modified URL is 53 // Note that normally, the reverse handler is only used if the modified URL is
49 // not modified, e.g., by adding a hash fragment. To support this behavior, 54 // not modified, e.g., by adding a hash fragment. To support this behavior,
50 // register the forward and reverse handlers separately, each with a 55 // register the forward and reverse handlers separately, each with a
51 // null_handler() for the opposite direction. 56 // null_handler() for the opposite direction.
52 virtual void AddHandlerPair(URLHandler handler, 57 virtual void AddHandlerPair(URLHandler handler,
53 URLHandler reverse_handler) = 0; 58 URLHandler reverse_handler) = 0;
54 59
55 protected: 60 protected:
56 virtual ~BrowserURLHandler() {} 61 virtual ~BrowserURLHandler() {}
57 }; 62 };
58 63
59 } // namespace content 64 } // namespace content
60 65
61 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_URL_HANDLER_H_ 66 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_URL_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698