| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 // Access to files in external storage is allowed. | 674 // Access to files in external storage is allowed. |
| 675 base::FilePath external_storage_path; | 675 base::FilePath external_storage_path; |
| 676 PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &external_storage_path); | 676 PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &external_storage_path); |
| 677 if (external_storage_path.IsParent(path)) | 677 if (external_storage_path.IsParent(path)) |
| 678 return true; | 678 return true; |
| 679 | 679 |
| 680 // Allow to load offline pages, which are stored in the $PROFILE_PATH/Offline | 680 // Allow to load offline pages, which are stored in the $PROFILE_PATH/Offline |
| 681 // Pages/archives. | 681 // Pages/archives. |
| 682 if (!profile_path_.empty()) { | 682 if (!profile_path_.empty()) { |
| 683 const base::FilePath offline_page_archives = | 683 const base::FilePath offline_page_archives = |
| 684 profile_path_.Append(chrome::kOfflinePageArchviesDirname); | 684 profile_path_.Append(chrome::kOfflinePageArchivesDirname); |
| 685 if (offline_page_archives.IsParent(path)) | 685 if (offline_page_archives.IsParent(path)) |
| 686 return true; | 686 return true; |
| 687 } | 687 } |
| 688 | 688 |
| 689 // Whitelist of other allowed directories. | 689 // Whitelist of other allowed directories. |
| 690 static const char* const kLocalAccessWhiteList[] = { | 690 static const char* const kLocalAccessWhiteList[] = { |
| 691 "/sdcard", | 691 "/sdcard", |
| 692 "/mnt/sdcard", | 692 "/mnt/sdcard", |
| 693 }; | 693 }; |
| 694 #endif | 694 #endif |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 if (!data_use_aggregator_) | 748 if (!data_use_aggregator_) |
| 749 return; | 749 return; |
| 750 | 750 |
| 751 if (is_data_usage_off_the_record_) { | 751 if (is_data_usage_off_the_record_) { |
| 752 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); | 752 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); |
| 753 return; | 753 return; |
| 754 } | 754 } |
| 755 | 755 |
| 756 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); | 756 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); |
| 757 } | 757 } |
| OLD | NEW |