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

Unified Diff: mojo/fetcher/network_fetcher.cc

Issue 1342503003: Move fetching logic out of ApplicationManager, eliminate url mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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/fetcher/network_fetcher.h ('k') | mojo/fetcher/switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « mojo/fetcher/network_fetcher.h ('k') | mojo/fetcher/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698