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

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

Issue 1928393003: Using separate directories based on LifetimeType. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 // Access to files in external storage is allowed. 669 // Access to files in external storage is allowed.
670 base::FilePath external_storage_path; 670 base::FilePath external_storage_path;
671 PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &external_storage_path); 671 PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &external_storage_path);
672 if (external_storage_path.IsParent(path)) 672 if (external_storage_path.IsParent(path))
673 return true; 673 return true;
674 674
675 // Allow to load offline pages, which are stored in the $PROFILE_PATH/Offline 675 // Allow to load offline pages, which are stored in the $PROFILE_PATH/Offline
676 // Pages/archives. 676 // Pages/archives.
677 if (!profile_path_.empty()) { 677 if (!profile_path_.empty()) {
678 const base::FilePath offline_page_archives = 678 const base::FilePath offline_page_archives =
679 profile_path_.Append(chrome::kOfflinePageArchviesDirname); 679 profile_path_.Append(chrome::kOfflinePageArchivesDirname);
680 if (offline_page_archives.IsParent(path)) 680 if (offline_page_archives.IsParent(path))
681 return true; 681 return true;
682 } 682 }
683 683
684 // Whitelist of other allowed directories. 684 // Whitelist of other allowed directories.
685 static const char* const kLocalAccessWhiteList[] = { 685 static const char* const kLocalAccessWhiteList[] = {
686 "/sdcard", 686 "/sdcard",
687 "/mnt/sdcard", 687 "/mnt/sdcard",
688 }; 688 };
689 #endif 689 #endif
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 if (!data_use_aggregator_) 743 if (!data_use_aggregator_)
744 return; 744 return;
745 745
746 if (is_data_usage_off_the_record_) { 746 if (is_data_usage_off_the_record_) {
747 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes); 747 data_use_aggregator_->ReportOffTheRecordDataUse(tx_bytes, rx_bytes);
748 return; 748 return;
749 } 749 }
750 750
751 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes); 751 data_use_aggregator_->ReportDataUse(request, tx_bytes, rx_bytes);
752 } 752 }
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/test_offline_page_model_builder.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698