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

Side by Side Diff: mojo/shell/fetcher.h

Issue 1121783003: Move navigations with POST or referrer to the shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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
« no previous file with comments | « mojo/shell/application_manager_unittest.cc ('k') | mojo/shell/local_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MOJO_SHELL_FETCHER_H_ 5 #ifndef MOJO_SHELL_FETCHER_H_
6 #define MOJO_SHELL_FETCHER_H_ 6 #define MOJO_SHELL_FETCHER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 10
(...skipping 29 matching lines...) Expand all
40 Fetcher(const FetchCallback& fetch_callback); 40 Fetcher(const FetchCallback& fetch_callback);
41 virtual ~Fetcher(); 41 virtual ~Fetcher();
42 42
43 // Returns the original URL that was fetched. 43 // Returns the original URL that was fetched.
44 virtual const GURL& GetURL() const = 0; 44 virtual const GURL& GetURL() const = 0;
45 45
46 // If the fetch resulted in a redirect, this returns the final URL after all 46 // If the fetch resulted in a redirect, this returns the final URL after all
47 // redirects. Otherwise, it returns an empty URL. 47 // redirects. Otherwise, it returns an empty URL.
48 virtual GURL GetRedirectURL() const = 0; 48 virtual GURL GetRedirectURL() const = 0;
49 49
50 // If the fetch resulted in a redirect, this returns the referer URL to use
51 // with the redirect.
52 virtual GURL GetRedirectReferer() const = 0;
53
50 virtual URLResponsePtr AsURLResponse(base::TaskRunner* task_runner, 54 virtual URLResponsePtr AsURLResponse(base::TaskRunner* task_runner,
51 uint32_t skip) = 0; 55 uint32_t skip) = 0;
52 56
53 virtual void AsPath( 57 virtual void AsPath(
54 base::TaskRunner* task_runner, 58 base::TaskRunner* task_runner,
55 base::Callback<void(const base::FilePath&, bool)> callback) = 0; 59 base::Callback<void(const base::FilePath&, bool)> callback) = 0;
56 60
57 virtual std::string MimeType() = 0; 61 virtual std::string MimeType() = 0;
58 62
59 virtual bool HasMojoMagic() = 0; 63 virtual bool HasMojoMagic() = 0;
60 64
61 virtual bool PeekFirstLine(std::string* line) = 0; 65 virtual bool PeekFirstLine(std::string* line) = 0;
62 66
63 bool PeekContentHandler(std::string* mojo_shebang, 67 bool PeekContentHandler(std::string* mojo_shebang,
64 GURL* mojo_content_handler_url); 68 GURL* mojo_content_handler_url);
65 69
66 protected: 70 protected:
67 static const char kMojoMagic[]; 71 static const char kMojoMagic[];
68 static const size_t kMaxShebangLength; 72 static const size_t kMaxShebangLength;
69 73
70 FetchCallback loader_callback_; 74 FetchCallback loader_callback_;
71 }; 75 };
72 76
73 } // namespace shell 77 } // namespace shell
74 } // namespace mojo 78 } // namespace mojo
75 79
76 #endif // MOJO_SHELL_FETCHER_H_ 80 #endif // MOJO_SHELL_FETCHER_H_
OLDNEW
« no previous file with comments | « mojo/shell/application_manager_unittest.cc ('k') | mojo/shell/local_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698