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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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
« no previous file with comments | « chrome/browser/net/chrome_net_log.cc ('k') | chrome/browser/net/connection_tester.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 if (g_allow_file_access_) 529 if (g_allow_file_access_)
530 return true; 530 return true;
531 531
532 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 532 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
533 return true; 533 return true;
534 #else 534 #else
535 #if defined(OS_CHROMEOS) 535 #if defined(OS_CHROMEOS)
536 // If we're running Chrome for ChromeOS on Linux, we want to allow file 536 // If we're running Chrome for ChromeOS on Linux, we want to allow file
537 // access. 537 // access.
538 if (!base::SysInfo::IsRunningOnChromeOS() || 538 if (!base::SysInfo::IsRunningOnChromeOS() ||
539 CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) { 539 base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
540 return true; 540 return true;
541 } 541 }
542 542
543 // Use a whitelist to only allow access to files residing in the list of 543 // Use a whitelist to only allow access to files residing in the list of
544 // directories below. 544 // directories below.
545 static const char* const kLocalAccessWhiteList[] = { 545 static const char* const kLocalAccessWhiteList[] = {
546 "/home/chronos/user/Downloads", 546 "/home/chronos/user/Downloads",
547 "/home/chronos/user/log", 547 "/home/chronos/user/log",
548 "/home/chronos/user/WebRTC Logs", 548 "/home/chronos/user/WebRTC Logs",
549 "/media", 549 "/media",
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 bool ChromeNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( 626 bool ChromeNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
627 const net::URLRequest& request, 627 const net::URLRequest& request,
628 const GURL& target_url, 628 const GURL& target_url,
629 const GURL& referrer_url) const { 629 const GURL& referrer_url) const {
630 base::debug::StackTrace callstack; 630 base::debug::StackTrace callstack;
631 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 631 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
632 base::Bind(&ReportInvalidReferrerSend, target_url, 632 base::Bind(&ReportInvalidReferrerSend, target_url,
633 referrer_url, callstack)); 633 referrer_url, callstack));
634 return true; 634 return true;
635 } 635 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_net_log.cc ('k') | chrome/browser/net/connection_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698