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

Side by Side Diff: mojo/shell/dynamic_application_loader.cc

Issue 708133002: win: build fixes (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: . Created 6 years, 1 month 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 | « crypto/BUILD.gn ('k') | net/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shell/dynamic_application_loader.h" 5 #include "mojo/shell/dynamic_application_loader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 virtual bool PeekFirstLine(std::string* line) = 0; 79 virtual bool PeekFirstLine(std::string* line) = 0;
80 80
81 void Load() { 81 void Load() {
82 // If the response begins with a #!mojo:<content-handler-url>, use it. 82 // If the response begins with a #!mojo:<content-handler-url>, use it.
83 GURL url; 83 GURL url;
84 std::string shebang; 84 std::string shebang;
85 if (PeekContentHandler(&shebang, &url)) { 85 if (PeekContentHandler(&shebang, &url)) {
86 load_callbacks_->LoadWithContentHandler( 86 load_callbacks_->LoadWithContentHandler(
87 url, AsURLResponse(context_->task_runners()->blocking_pool(), 87 url, AsURLResponse(context_->task_runners()->blocking_pool(),
88 shebang.size())); 88 static_cast<int>(shebang.size())));
89 return; 89 return;
90 } 90 }
91 91
92 MimeTypeToURLMap::iterator iter = mime_type_to_url_->find(MimeType()); 92 MimeTypeToURLMap::iterator iter = mime_type_to_url_->find(MimeType());
93 if (iter != mime_type_to_url_->end()) { 93 if (iter != mime_type_to_url_->end()) {
94 load_callbacks_->LoadWithContentHandler( 94 load_callbacks_->LoadWithContentHandler(
95 iter->second, 95 iter->second,
96 AsURLResponse(context_->task_runners()->blocking_pool(), 0)); 96 AsURLResponse(context_->task_runners()->blocking_pool(), 0));
97 return; 97 return;
98 } 98 }
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // TODO(darin): What should we do about service errors? This implies that 391 // TODO(darin): What should we do about service errors? This implies that
392 // the app closed its handle to the service manager. Maybe we don't care? 392 // the app closed its handle to the service manager. Maybe we don't care?
393 } 393 }
394 394
395 void DynamicApplicationLoader::LoaderComplete(Loader* loader) { 395 void DynamicApplicationLoader::LoaderComplete(Loader* loader) {
396 loaders_.erase(std::find(loaders_.begin(), loaders_.end(), loader)); 396 loaders_.erase(std::find(loaders_.begin(), loaders_.end(), loader));
397 } 397 }
398 398
399 } // namespace shell 399 } // namespace shell
400 } // namespace mojo 400 } // namespace mojo
OLDNEW
« no previous file with comments | « crypto/BUILD.gn ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698