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

Side by Side Diff: chromecast/browser/cast_network_delegate.cc

Issue 1151253003: Chromecast: moves chromecast_switches.* from common/ to base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 "chromecast/browser/cast_network_delegate.h" 5 #include "chromecast/browser/cast_network_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chromecast/common/chromecast_switches.h" 9 #include "chromecast/base/chromecast_switches.h"
10 10
11 namespace chromecast { 11 namespace chromecast {
12 namespace shell { 12 namespace shell {
13 13
14 CastNetworkDelegate::CastNetworkDelegate() { 14 CastNetworkDelegate::CastNetworkDelegate() {
15 DetachFromThread(); 15 DetachFromThread();
16 } 16 }
17 17
18 CastNetworkDelegate::~CastNetworkDelegate() { 18 CastNetworkDelegate::~CastNetworkDelegate() {
19 } 19 }
20 20
21 bool CastNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, 21 bool CastNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
22 const base::FilePath& path) const { 22 const base::FilePath& path) const {
23 if (base::CommandLine::ForCurrentProcess()-> 23 if (base::CommandLine::ForCurrentProcess()->
24 HasSwitch(switches::kEnableLocalFileAccesses)) { 24 HasSwitch(switches::kEnableLocalFileAccesses)) {
25 return true; 25 return true;
26 } 26 }
27 27
28 LOG(WARNING) << "Could not access file " << path.value() 28 LOG(WARNING) << "Could not access file " << path.value()
29 << ". All file accesses are forbidden."; 29 << ". All file accesses are forbidden.";
30 return false; 30 return false;
31 } 31 }
32 32
33 } // namespace shell 33 } // namespace shell
34 } // namespace chromecast 34 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | chromecast/browser/metrics/cast_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698