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

Side by Side Diff: mojo/fetcher/data_fetcher.cc

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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 | « mojo/fetcher/BUILD.gn ('k') | mojo/fetcher/data_fetcher_unittest.cc » ('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 "mojo/fetcher/data_fetcher.h" 5 #include "mojo/fetcher/data_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/thread_task_runner_handle.h" 12 #include "base/thread_task_runner_handle.h"
13 #include "mojo/public/cpp/system/data_pipe.h"
13 #include "net/base/data_url.h" 14 #include "net/base/data_url.h"
14 #include "third_party/mojo/src/mojo/public/cpp/system/data_pipe.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 namespace fetcher { 17 namespace fetcher {
18 18
19 ScopedDataPipeConsumerHandle CreateConsumerHandleForString( 19 ScopedDataPipeConsumerHandle CreateConsumerHandleForString(
20 const std::string& data) { 20 const std::string& data) {
21 if (data.size() > std::numeric_limits<uint32_t>::max()) 21 if (data.size() > std::numeric_limits<uint32_t>::max())
22 return ScopedDataPipeConsumerHandle(); 22 return ScopedDataPipeConsumerHandle();
23 uint32_t num_bytes = static_cast<uint32_t>(data.size()); 23 uint32_t num_bytes = static_cast<uint32_t>(data.size());
24 MojoCreateDataPipeOptions options; 24 MojoCreateDataPipeOptions options;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool DataFetcher::PeekFirstLine(std::string* line) { 106 bool DataFetcher::PeekFirstLine(std::string* line) {
107 // This is only called for 'mojo magic' (i.e. detecting shebang'ed 107 // This is only called for 'mojo magic' (i.e. detecting shebang'ed
108 // content-handler. Since HasMojoMagic() returns false above, this should 108 // content-handler. Since HasMojoMagic() returns false above, this should
109 // never be reached. 109 // never be reached.
110 NOTREACHED(); 110 NOTREACHED();
111 return false; 111 return false;
112 } 112 }
113 113
114 } // namespace fetcher 114 } // namespace fetcher
115 } // namespace mojo 115 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/fetcher/BUILD.gn ('k') | mojo/fetcher/data_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698