| Index: mojo/fetcher/network_fetcher.cc
|
| diff --git a/mojo/shell/network_fetcher.cc b/mojo/fetcher/network_fetcher.cc
|
| similarity index 96%
|
| rename from mojo/shell/network_fetcher.cc
|
| rename to mojo/fetcher/network_fetcher.cc
|
| index c520477faf7247cf78f06341c4b73360c9c60c9b..24a11688c30eb289df18db9301fa118a3ba6af15 100644
|
| --- a/mojo/shell/network_fetcher.cc
|
| +++ b/mojo/fetcher/network_fetcher.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "mojo/shell/network_fetcher.h"
|
| +#include "mojo/fetcher/network_fetcher.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| @@ -27,7 +27,7 @@
|
| #include "mojo/shell/switches.h"
|
|
|
| namespace mojo {
|
| -namespace shell {
|
| +namespace fetcher {
|
|
|
| NetworkFetcher::NetworkFetcher(bool disable_cache,
|
| mojo::URLRequestPtr request,
|
| @@ -208,14 +208,14 @@ std::string NetworkFetcher::MimeType() {
|
|
|
| bool NetworkFetcher::HasMojoMagic() {
|
| std::string magic;
|
| - return BlockingPeekNBytes(response_->body.get(), &magic, strlen(kMojoMagic),
|
| - kPeekTimeout) &&
|
| + return shell::BlockingPeekNBytes(response_->body.get(), &magic,
|
| + strlen(kMojoMagic), kPeekTimeout) &&
|
| magic == kMojoMagic;
|
| }
|
|
|
| bool NetworkFetcher::PeekFirstLine(std::string* line) {
|
| - return BlockingPeekLine(response_->body.get(), line, kMaxShebangLength,
|
| - kPeekTimeout);
|
| + return shell::BlockingPeekLine(response_->body.get(), line, kMaxShebangLength,
|
| + kPeekTimeout);
|
| }
|
|
|
| void NetworkFetcher::StartNetworkRequest(mojo::URLRequestPtr request,
|
| @@ -254,5 +254,5 @@ void NetworkFetcher::OnLoadComplete(URLResponsePtr response) {
|
| loader_callback_.Run(owner.Pass());
|
| }
|
|
|
| -} // namespace shell
|
| +} // namespace fetcher
|
| } // namespace mojo
|
|
|