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

Side by Side Diff: libraries/nacl-mounts/AppEngine/AppEngineMount.cc

Issue 10392070: Socket subsystem implementation (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | libraries/nacl-mounts/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 #include <assert.h> 6 #include <assert.h>
7 #include <errno.h> 7 #include <errno.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <vector> 9 #include <vector>
10 #include "../base/UrlLoaderJob.h" 10 #include "../base/UrlLoaderJob.h"
11 #include "../util/Path.h" 11 #include "../util/Path.h"
12 #include "../util/SimpleAutoLock.h" 12 #include "../util/PthreadHelpers.h"
13 #include "AppEngineMount.h" 13 #include "AppEngineMount.h"
14 #include "AppEngineNode.h" 14 #include "AppEngineNode.h"
15 15
16 AppEngineMount::AppEngineMount(MainThreadRunner *runner, 16 AppEngineMount::AppEngineMount(MainThreadRunner *runner,
17 const std::string& base_url) { 17 const std::string& base_url) {
18 if (pthread_mutex_init(&ae_lock_, NULL)) assert(0); 18 if (pthread_mutex_init(&ae_lock_, NULL)) assert(0);
19 runner_ = runner; 19 runner_ = runner;
20 base_url_ = base_url; 20 base_url_ = base_url;
21 slots_.Alloc(); 21 slots_.Alloc();
22 int slot = CreateNode("/", NULL); 22 int slot = CreateNode("/", NULL);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 // Cache this result in the node. At this point, we consider the node 319 // Cache this result in the node. At this point, we consider the node
320 // to be a directory for the rest of run-time. 320 // to be a directory for the rest of run-time.
321 if (num_bytes > 0) { 321 if (num_bytes > 0) {
322 node->set_is_dir(true); 322 node->set_is_dir(true);
323 return true; 323 return true;
324 } 324 }
325 // Assume its not for now, but don't stick to that. 325 // Assume its not for now, but don't stick to that.
326 return false; 326 return false;
327 } 327 }
OLDNEW
« no previous file with comments | « no previous file | libraries/nacl-mounts/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698