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

Unified Diff: mojo/shell/fetcher/network_fetcher.cc

Issue 1563413002: Move fetchers into mojo/shell/fetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/fetcher/network_fetcher.h ('k') | mojo/shell/fetcher/network_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/fetcher/network_fetcher.cc
diff --git a/mojo/fetcher/network_fetcher.cc b/mojo/shell/fetcher/network_fetcher.cc
similarity index 95%
rename from mojo/fetcher/network_fetcher.cc
rename to mojo/shell/fetcher/network_fetcher.cc
index 28280061371b12ef801f267270f62b277e0a18a1..e9e20c6895871c9d15753fc892a555174d273433 100644
--- a/mojo/fetcher/network_fetcher.cc
+++ b/mojo/shell/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/fetcher/network_fetcher.h"
+#include "mojo/shell/fetcher/network_fetcher.h"
#include <stdint.h>
@@ -31,7 +31,7 @@
#include "mojo/shell/switches.h"
namespace mojo {
-namespace fetcher {
+namespace shell {
NetworkFetcher::NetworkFetcher(bool disable_cache,
mojo::URLRequestPtr request,
@@ -212,14 +212,13 @@ std::string NetworkFetcher::MimeType() {
bool NetworkFetcher::HasMojoMagic() {
std::string magic;
- return shell::BlockingPeekNBytes(response_->body.get(), &magic,
- strlen(kMojoMagic), kPeekTimeout) &&
- magic == kMojoMagic;
+ return BlockingPeekNBytes(response_->body.get(), &magic, strlen(kMojoMagic),
+ kPeekTimeout) && magic == kMojoMagic;
}
bool NetworkFetcher::PeekFirstLine(std::string* line) {
- return shell::BlockingPeekLine(response_->body.get(), line, kMaxShebangLength,
- kPeekTimeout);
+ return BlockingPeekLine(response_->body.get(), line, kMaxShebangLength,
+ kPeekTimeout);
}
void NetworkFetcher::StartNetworkRequest(mojo::URLRequestPtr request,
@@ -250,5 +249,5 @@ void NetworkFetcher::OnLoadComplete(URLResponsePtr response) {
loader_callback_.Run(std::move(owner));
}
-} // namespace fetcher
+} // namespace shell
} // namespace mojo
« no previous file with comments | « mojo/shell/fetcher/network_fetcher.h ('k') | mojo/shell/fetcher/network_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698