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

Side by Side Diff: mojo/shell/network_delegate.cc

Issue 93793009: Implement ServiceManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Allow Android to be built Created 7 years 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 | « mojo/shell/desktop/mojo_main.cc ('k') | mojo/shell/run.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/network_delegate.h" 5 #include "mojo/shell/network_delegate.h"
6 6
7 #include "base/command_line.h"
8 #include "mojo/shell/switches.h"
9 #include "net/url_request/url_request.h" 7 #include "net/url_request/url_request.h"
10 8
11 namespace mojo { 9 namespace mojo {
12 namespace shell { 10 namespace shell {
13 11
14 NetworkDelegate::NetworkDelegate() { 12 NetworkDelegate::NetworkDelegate() {
15 DetachFromThread(); 13 DetachFromThread();
16 } 14 }
17 15
18 bool NetworkDelegate::OnCanAccessFile(const net::URLRequest& request, 16 bool NetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
19 const base::FilePath& path) const { 17 const base::FilePath& path) const {
20 // TODO(aa): We might want to add a --allow-file-urls or something, but 18 // TODO(davemoore): Implement.
21 // starting conservative. 19 return true;
22 return CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kApp)
23 == request.url().spec();
24 } 20 }
25 21
26 } // namespace shell 22 } // namespace shell
27 } // namespace mojo 23 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/desktop/mojo_main.cc ('k') | mojo/shell/run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698