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

Side by Side Diff: shell/application_manager/local_fetcher.cc

Issue 972433004: Use the mojo::shell namespace consistently underly shell/. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Java! Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « shell/application_manager/local_fetcher.h ('k') | shell/application_manager/network_fetcher.h » ('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 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 "shell/application_manager/local_fetcher.h" 5 #include "shell/application_manager/local_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "mojo/common/common_type_converters.h" 13 #include "mojo/common/common_type_converters.h"
14 #include "mojo/common/data_pipe_utils.h" 14 #include "mojo/common/data_pipe_utils.h"
15 #include "url/url_util.h" 15 #include "url/url_util.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace shell {
18 19
19 namespace { 20 namespace {
20 21
21 void IgnoreResult(bool result) { 22 void IgnoreResult(bool result) {
22 } 23 }
23 24
24 } // namespace 25 } // namespace
25 26
26 // A loader for local files. 27 // A loader for local files.
27 LocalFetcher::LocalFetcher(const GURL& url, 28 LocalFetcher::LocalFetcher(const GURL& url,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 bool LocalFetcher::PeekFirstLine(std::string* line) { 93 bool LocalFetcher::PeekFirstLine(std::string* line) {
93 std::string start_of_file; 94 std::string start_of_file;
94 ReadFileToString(path_, &start_of_file, kMaxShebangLength); 95 ReadFileToString(path_, &start_of_file, kMaxShebangLength);
95 size_t return_position = start_of_file.find('\n'); 96 size_t return_position = start_of_file.find('\n');
96 if (return_position == std::string::npos) 97 if (return_position == std::string::npos)
97 return false; 98 return false;
98 *line = start_of_file.substr(0, return_position + 1); 99 *line = start_of_file.substr(0, return_position + 1);
99 return true; 100 return true;
100 } 101 }
101 102
103 } // namespace shell
102 } // namespace mojo 104 } // namespace mojo
OLDNEW
« no previous file with comments | « shell/application_manager/local_fetcher.h ('k') | shell/application_manager/network_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698