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

Side by Side Diff: mojo/dart/embedder/mojo_io_natives.cc

Issue 1346773002: Stop running pub get at gclient sync time and fix build bugs (Closed) Base URL: git@github.com:domokit/mojo.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 unified diff | Download patch
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 <stdio.h> 5 #include <stdio.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "dart/runtime/include/dart_api.h"
11 #include "mojo/dart/embedder/builtin.h" 10 #include "mojo/dart/embedder/builtin.h"
12 #include "mojo/dart/embedder/common.h" 11 #include "mojo/dart/embedder/common.h"
13 #include "mojo/dart/embedder/io/internet_address.h" 12 #include "mojo/dart/embedder/io/internet_address.h"
14 #include "mojo/dart/embedder/mojo_dart_state.h" 13 #include "mojo/dart/embedder/mojo_dart_state.h"
15 14 #include "mojo/public/third_party/dart/runtime/include/dart_api.h"
16 15
17 namespace mojo { 16 namespace mojo {
18 namespace dart { 17 namespace dart {
19 18
20 #define MOJO_IO_NATIVE_LIST(V) \ 19 #define MOJO_IO_NATIVE_LIST(V) \
21 V(InternetAddress_Parse, 1) \ 20 V(InternetAddress_Parse, 1) \
22 V(InternetAddress_Reverse, 1) \ 21 V(InternetAddress_Reverse, 1) \
23 V(Platform_NumberOfProcessors, 0) \ 22 V(Platform_NumberOfProcessors, 0) \
24 V(Platform_OperatingSystem, 0) \ 23 V(Platform_OperatingSystem, 0) \
25 V(Platform_PathSeparator, 0) \ 24 V(Platform_PathSeparator, 0) \
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void Process_Pid(Dart_NativeArguments arguments) { 174 void Process_Pid(Dart_NativeArguments arguments) {
176 // TODO(rudominer) After sandboxing is implemented getpid() will not return 175 // TODO(rudominer) After sandboxing is implemented getpid() will not return
177 // the real pid. Most likely it will return the value 1. We need to decide 176 // the real pid. Most likely it will return the value 1. We need to decide
178 // what behavior we want Dart's pid getter to have when sandboxed. 177 // what behavior we want Dart's pid getter to have when sandboxed.
179 pid_t pid = getpid(); 178 pid_t pid = getpid();
180 Dart_SetIntegerReturnValue(arguments, static_cast<int64_t>(pid)); 179 Dart_SetIntegerReturnValue(arguments, static_cast<int64_t>(pid));
181 } 180 }
182 181
183 } // namespace dart 182 } // namespace dart
184 } // namespace mojo 183 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698