OLD | NEW |
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 #include "mojo/fetcher/about_fetcher.h" | 5 #include "mojo/shell/fetcher/about_fetcher.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace fetcher { | 18 namespace shell { |
19 namespace { | 19 namespace { |
20 | 20 |
21 void RunFetcherCallback(const shell::Fetcher::FetchCallback& callback, | 21 void RunFetcherCallback(const Fetcher::FetchCallback& callback, |
22 scoped_ptr<shell::Fetcher> fetcher, | 22 scoped_ptr<Fetcher> fetcher, |
23 bool success) { | 23 bool success) { |
24 callback.Run(success ? std::move(fetcher) : nullptr); | 24 callback.Run(success ? std::move(fetcher) : nullptr); |
25 } | 25 } |
26 | 26 |
27 } // namespace | 27 } // namespace |
28 | 28 |
29 const char AboutFetcher::kAboutScheme[] = "about"; | 29 const char AboutFetcher::kAboutScheme[] = "about"; |
30 const char AboutFetcher::kAboutBlankURL[] = "about:blank"; | 30 const char AboutFetcher::kAboutBlankURL[] = "about:blank"; |
31 | 31 |
32 // static | 32 // static |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 bool AboutFetcher::HasMojoMagic() { | 106 bool AboutFetcher::HasMojoMagic() { |
107 return false; | 107 return false; |
108 } | 108 } |
109 | 109 |
110 bool AboutFetcher::PeekFirstLine(std::string* line) { | 110 bool AboutFetcher::PeekFirstLine(std::string* line) { |
111 // The only URL handled currently is "about:blank" which doesn't have a body. | 111 // The only URL handled currently is "about:blank" which doesn't have a body. |
112 return false; | 112 return false; |
113 } | 113 } |
114 | 114 |
115 } // namespace fetcher | 115 } // namespace shell |
116 } // namespace mojo | 116 } // namespace mojo |
OLD | NEW |