OLD | NEW |
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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 if (!base::SysInfo::IsRunningOnChromeOS() || | 761 if (!base::SysInfo::IsRunningOnChromeOS() || |
762 CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) { | 762 CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) { |
763 return true; | 763 return true; |
764 } | 764 } |
765 | 765 |
766 // Use a whitelist to only allow access to files residing in the list of | 766 // Use a whitelist to only allow access to files residing in the list of |
767 // directories below. | 767 // directories below. |
768 static const char* const kLocalAccessWhiteList[] = { | 768 static const char* const kLocalAccessWhiteList[] = { |
769 "/home/chronos/user/Downloads", | 769 "/home/chronos/user/Downloads", |
770 "/home/chronos/user/log", | 770 "/home/chronos/user/log", |
| 771 "/home/chronos/user/WebRTC Logs", |
771 "/media", | 772 "/media", |
772 "/opt/oem", | 773 "/opt/oem", |
773 "/usr/share/chromeos-assets", | 774 "/usr/share/chromeos-assets", |
774 "/tmp", | 775 "/tmp", |
775 "/var/log", | 776 "/var/log", |
776 }; | 777 }; |
777 | 778 |
778 // The actual location of "/home/chronos/user/Downloads" is the Downloads | 779 // The actual location of "/home/chronos/user/Downloads" is the Downloads |
779 // directory under the profile path ("/home/chronos/user' is a hard link to | 780 // directory under the profile path ("/home/chronos/user' is a hard link to |
780 // current primary logged in profile.) For the support of multi-profile | 781 // current primary logged in profile.) For the support of multi-profile |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 data_reduction_proxy::DataReductionProxyRequestType request_type) { | 862 data_reduction_proxy::DataReductionProxyRequestType request_type) { |
862 DCHECK_GE(received_content_length, 0); | 863 DCHECK_GE(received_content_length, 0); |
863 DCHECK_GE(original_content_length, 0); | 864 DCHECK_GE(original_content_length, 0); |
864 StoreAccumulatedContentLength(received_content_length, | 865 StoreAccumulatedContentLength(received_content_length, |
865 original_content_length, | 866 original_content_length, |
866 request_type, | 867 request_type, |
867 reinterpret_cast<Profile*>(profile_)); | 868 reinterpret_cast<Profile*>(profile_)); |
868 received_content_length_ += received_content_length; | 869 received_content_length_ += received_content_length; |
869 original_content_length_ += original_content_length; | 870 original_content_length_ += original_content_length; |
870 } | 871 } |
OLD | NEW |