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

Side by Side Diff: mojo/dart/embedder/io/mojo_patch.dart

Issue 1694413003: Cleanups in the Mojo package. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address comments. Created 4 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 | « no previous file | mojo/dart/packages/mojo/lib/src/buffer.dart » ('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 import 'dart:_mojo/application.dart'; 5 import 'dart:_mojo/application.dart';
6 import 'dart:_mojo/bindings.dart'; 6 import 'dart:_mojo/bindings.dart';
7 import 'dart:_mojo/core.dart'; 7 import 'dart:_mojo/core.dart';
8 import 'dart:_mojo/mojo/network_error.mojom.dart'; 8 import 'dart:_mojo/mojo/network_error.mojom.dart';
9 import 'dart:_mojo_services/mojo/host_resolver.mojom.dart'; 9 import 'dart:_mojo_services/mojo/host_resolver.mojom.dart';
10 import 'dart:_mojo_services/mojo/net_address.mojom.dart'; 10 import 'dart:_mojo_services/mojo/net_address.mojom.dart';
(...skipping 21 matching lines...) Expand all
32 // 32 //
33 int _networkServiceHandle; 33 int _networkServiceHandle;
34 int _filesServiceHandle; 34 int _filesServiceHandle;
35 NetworkServiceProxy _networkService; 35 NetworkServiceProxy _networkService;
36 HostResolverProxy _hostResolver; 36 HostResolverProxy _hostResolver;
37 FilesProxy _files; 37 FilesProxy _files;
38 DirectoryProxy _rootDirectory; 38 DirectoryProxy _rootDirectory;
39 DirectoryProxy _systemTempDirectory; 39 DirectoryProxy _systemTempDirectory;
40 40
41 void _initialize(int networkServiceHandle, int filesServiceHandle) { 41 void _initialize(int networkServiceHandle, int filesServiceHandle) {
42 if (networkServiceHandle != MojoHandle.INVALID) { 42 if (networkServiceHandle != MojoHandle.invalidHandle) {
43 _networkServiceHandle = networkServiceHandle; 43 _networkServiceHandle = networkServiceHandle;
44 } 44 }
45 if (filesServiceHandle != MojoHandle.INVALID) { 45 if (filesServiceHandle != MojoHandle.invalidHandle) {
46 _filesServiceHandle = filesServiceHandle; 46 _filesServiceHandle = filesServiceHandle;
47 } 47 }
48 } 48 }
49 49
50 void _shutdown() { 50 void _shutdown() {
51 if (_networkServiceHandle != null) { 51 if (_networkServiceHandle != null) {
52 // Network service proxies were never initialized. Create a handle 52 // Network service proxies were never initialized. Create a handle
53 // and close it. 53 // and close it.
54 var handle = new MojoHandle(_networkServiceHandle); 54 var handle = new MojoHandle(_networkServiceHandle);
55 _networkServiceHandle = null; 55 _networkServiceHandle = null;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 static _throwOnError(NetworkError error) { 291 static _throwOnError(NetworkError error) {
292 if (_okay(error)) { 292 if (_okay(error)) {
293 return; 293 return;
294 } 294 }
295 throw new OSError(error.description, error.code); 295 throw new OSError(error.description, error.code);
296 } 296 }
297 } 297 }
298 298
OLDNEW
« no previous file with comments | « no previous file | mojo/dart/packages/mojo/lib/src/buffer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698