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

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

Issue 23904025: Move IsRunningOnChromeOS to SysInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fix Created 7 years, 2 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 | « chrome/browser/lifetime/application_lifetime.cc ('k') | chrome/browser/ui/ash/ash_init.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "net/base/net_errors.h" 45 #include "net/base/net_errors.h"
46 #include "net/base/net_log.h" 46 #include "net/base/net_log.h"
47 #include "net/cookies/canonical_cookie.h" 47 #include "net/cookies/canonical_cookie.h"
48 #include "net/cookies/cookie_options.h" 48 #include "net/cookies/cookie_options.h"
49 #include "net/http/http_request_headers.h" 49 #include "net/http/http_request_headers.h"
50 #include "net/http/http_response_headers.h" 50 #include "net/http/http_response_headers.h"
51 #include "net/socket_stream/socket_stream.h" 51 #include "net/socket_stream/socket_stream.h"
52 #include "net/url_request/url_request.h" 52 #include "net/url_request/url_request.h"
53 53
54 #if defined(OS_CHROMEOS) 54 #if defined(OS_CHROMEOS)
55 #include "base/chromeos/chromeos_version.h"
56 #include "base/command_line.h" 55 #include "base/command_line.h"
56 #include "base/sys_info.h"
57 #include "chrome/common/chrome_switches.h" 57 #include "chrome/common/chrome_switches.h"
58 #endif 58 #endif
59 59
60 #if defined(ENABLE_CONFIGURATION_POLICY) 60 #if defined(ENABLE_CONFIGURATION_POLICY)
61 #include "chrome/browser/policy/url_blacklist_manager.h" 61 #include "chrome/browser/policy/url_blacklist_manager.h"
62 #endif 62 #endif
63 63
64 using content::BrowserThread; 64 using content::BrowserThread;
65 using content::RenderViewHost; 65 using content::RenderViewHost;
66 using content::ResourceRequestInfo; 66 using content::ResourceRequestInfo;
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 const base::FilePath& path) const { 634 const base::FilePath& path) const {
635 if (g_allow_file_access_) 635 if (g_allow_file_access_)
636 return true; 636 return true;
637 637
638 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 638 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
639 return true; 639 return true;
640 #else 640 #else
641 #if defined(OS_CHROMEOS) 641 #if defined(OS_CHROMEOS)
642 // If we're running Chrome for ChromeOS on Linux, we want to allow file 642 // If we're running Chrome for ChromeOS on Linux, we want to allow file
643 // access. 643 // access.
644 if (!base::chromeos::IsRunningOnChromeOS() || 644 if (!base::SysInfo::IsRunningOnChromeOS() ||
645 CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) { 645 CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
646 return true; 646 return true;
647 } 647 }
648 648
649 // Use a whitelist to only allow access to files residing in the list of 649 // Use a whitelist to only allow access to files residing in the list of
650 // directories below. 650 // directories below.
651 static const char* const kLocalAccessWhiteList[] = { 651 static const char* const kLocalAccessWhiteList[] = {
652 "/home/chronos/user/Downloads", 652 "/home/chronos/user/Downloads",
653 "/home/chronos/user/log", 653 "/home/chronos/user/log",
654 "/media", 654 "/media",
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 int64 received_content_length, int64 original_content_length, 738 int64 received_content_length, int64 original_content_length,
739 bool via_data_reduction_proxy) { 739 bool via_data_reduction_proxy) {
740 DCHECK_GE(received_content_length, 0); 740 DCHECK_GE(received_content_length, 0);
741 DCHECK_GE(original_content_length, 0); 741 DCHECK_GE(original_content_length, 0);
742 StoreAccumulatedContentLength(received_content_length, 742 StoreAccumulatedContentLength(received_content_length,
743 original_content_length, 743 original_content_length,
744 via_data_reduction_proxy); 744 via_data_reduction_proxy);
745 received_content_length_ += received_content_length; 745 received_content_length_ += received_content_length;
746 original_content_length_ += original_content_length; 746 original_content_length_ += original_content_length;
747 } 747 }
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.cc ('k') | chrome/browser/ui/ash/ash_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698