summaryrefslogtreecommitdiffstats
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* FileSystem: Prevent iterator from being deleted after database.cmumford2016-01-274-12/+23
| | | | | | | | | leveldb::Iterator's must be deleted before leveldb::DB. No known crashes for these two functions have been observed. Review URL: https://codereview.chromium.org/1639973002 Cr-Commit-Position: refs/heads/master@{#371814}
* Run recursive file operations sequentially.fukino2016-01-262-30/+8
| | | | | | | | | | | | Parallel copy can have huge performance drop in some cases. (See issue 578923 for the detail) For safety and simplicity, this CL makes the recursive file operations sequential. BUG=578923 TEST=manually confirm the performance of copying a directory to a SD card. Review URL: https://codereview.chromium.org/1619733004 Cr-Commit-Position: refs/heads/master@{#371467}
* Disk cache blobs need to start from offset when readingjkarlin2016-01-231-3/+4
| | | | | | | | | | | This CL makes disk cache blobs start from the given element's offset, which enables blob slicing. BUG=522322 Review URL: https://codereview.chromium.org/1614883002 Cr-Commit-Position: refs/heads/master@{#371098}
* Make URLRequestJob::SetStatus private.mmenke2016-01-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent CLs have already made it so URLRequestJob itself calls the method itself whenever necessary, except when URLRequestJob::Start is being called, where subclasses were still expected to invoke it. Most of them were failing to do so, but since nothing cares about the state after start, and little distinguished between ERR_IO_PENDING and SUCCESS, everything was still working. URLRequest now sets its status itself before it starts a URLRequestJob. This CL also makes the URLRequest consistently have a status of ERR_IO_PENDING when it's doing something - there were a number of paths where this wasn't previously the case. The state machine changes also coincidentally fix issue 575213, which regressed in https://codereview.chromium.org/1467603002, so this CL includes a test for that fix. In the future, I'd really like to get rid of URLRequestJob::SetStatus, and have URLRequests manage their own status. BUG=564250,575213 TBR=jianli@chromium.org, phajdan.jr@chromium.org Review URL: https://codereview.chromium.org/1563633002 Cr-Commit-Position: refs/heads/master@{#371072}
* net: move more functions out of net_util.htfarina2016-01-206-6/+6
| | | | | | | | | | | | | | | | | | This moves everything except IsHostnameNonUnique(), GetHostName(), ResolveLocalHostname() and IsLocalhost() out of net_util.h, moving them into url_util.h. We will discuss what to do with the remaining 4 functions in a separate CL. BUG=488531 TEST=net_unittests R=eroman@chromium.org TBR=darin@chromium.org Review URL: https://codereview.chromium.org/1585773008 Cr-Commit-Position: refs/heads/master@{#370385}
* Fix remaining incompatibilities between scoped_ptr and unique_ptr.dcheng2016-01-201-1/+1
| | | | | | | | | | | | | | | | | scoped_ptr is more convertible to bool than std::unique_ptr. bool x = scoped_ptr<int>(); // compiles bool y = std::unique_ptr<int>(); // explodes std::unique_ptr is not streamable: LOG(ERROR) << scoped_ptr<int>(); // compiles LOG(ERROR) << std::unique_ptr<int>(); // explodes BUG=579269,579270 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1609923002 Cr-Commit-Position: refs/heads/master@{#370266}
* Quota: Add Quota.DaysSinceLastAccess histogram for the time between origin ↵michaeln2016-01-082-31/+18
| | | | | | | | | | storage accesses. BUG=570858 Review URL: https://codereview.chromium.org/1560543002 Cr-Commit-Position: refs/heads/master@{#368228}
* Add Quota.TimeToInitializeGlobalQuota histogram for how long it takes to ↵michaeln2016-01-072-4/+11
| | | | | | | | | | compute that value during initialization. BUG=349708 Review URL: https://codereview.chromium.org/1569723002 Cr-Commit-Position: refs/heads/master@{#368174}
* net: extract GetDirectoryListingXXX functions into directory_listing.*tfarina2016-01-061-1/+1
| | | | | | | | | | | | | | This patch moves these function from net_util into a new component (directory_listing.*) as it seems a more suitable place than the generic net_util.h header. BUG=488531 R=eroman@chromium.org TBR=creis@chromium.org,nhiroki@chromium.org,jshin@chromium.org Review URL: https://codereview.chromium.org/1548503002 Cr-Commit-Position: refs/heads/master@{#367926}
* Cleanup: Remove double semicolons.thestig2016-01-041-1/+1
| | | | | | | | Found with: git grep -l ';;$' | egrep '\.(cc|h)$' | grep -v third_party Review URL: https://codereview.chromium.org/1558633002 Cr-Commit-Position: refs/heads/master@{#367361}
* Remove random lonely semicolons.thestig2015-12-301-1/+0
| | | | | | Review URL: https://codereview.chromium.org/1553623002 Cr-Commit-Position: refs/heads/master@{#367171}
* Convert Pass()→std::move() in //storagedcheng2015-12-2724-151/+143
| | | | | | | | | | | | ❆(੭ु ◜◡‾)੭ु⁾☃❆ BUG=557422 R=avi@chromium.org TBR=kinuko@chromium.org Review URL: https://codereview.chromium.org/1546243002 Cr-Commit-Position: refs/heads/master@{#366944}
* Switch to standard integer types in storage/.avi2015-12-21156-616/+927
| | | | | | | | | BUG=138542 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/1541933002 Cr-Commit-Position: refs/heads/master@{#366458}
* Remove support for a URLRequest having a NULL Delegate.mmenke2015-12-171-9/+4
| | | | | | | | | | | | | | This could be used to prevent it from invoking any callbacks, but this codepath was untested, and is only used by one consumer in production codes and a couple random tests, which can all easily be modified not to depend on it. BUG=569055 TBR=marq@chromium.org Review URL: https://codereview.chromium.org/1523433002 Cr-Commit-Position: refs/heads/master@{#365909}
* Add 3 new quota related histograms.michaeln2015-12-172-14/+24
| | | | | | | | | | | | | | | Quota.AvailableDiskSpace Amount of free disk space for the profile directory. Quota.GlobalTemporaryQuota The size of the global temporary storage pool. Quota.TotalDiskSpace Total disk space for the profile directory. Review URL: https://codereview.chromium.org/1527103003 Cr-Commit-Position: refs/heads/master@{#365730}
* [Blob] Fix for resetting reader.dmurph2015-12-152-6/+22
| | | | | | | | | | | | R=michaeln BUG=567692 Committed-First-Time: https://crrev.com/ebf7a6b19a7a468195a5606fbd2bbd6d07a26ea2 Cr-Commit-Position-First-Time: refs/heads/master@{#365177} Review URL: https://codereview.chromium.org/1513783005 Cr-Commit-Position: refs/heads/master@{#365316}
* Revert of [Blob] Fix for resetting reader. (patchset #8 id:130001 of ↵yoichio2015-12-152-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1513783005/ ) Reason for revert: CL was duplicated and compile failed. https://build.chromium.org/p/chromium.mac/builders/Mac%20GN/builds/22509 https://chromium.googlesource.com/chromium/src/+log/ebf7a6b19a7a468195a5606fbd2bbd6d07a26ea2 Original issue's description: > [Blob] Fix for resetting reader. > > R=michaeln > BUG=567692 > > Committed: https://crrev.com/ebf7a6b19a7a468195a5606fbd2bbd6d07a26ea2 > Cr-Commit-Position: refs/heads/master@{#365177} TBR=michaeln@chromium.org,mmenke@chromium.org,dmurph@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=567692 Review URL: https://codereview.chromium.org/1529743002 Cr-Commit-Position: refs/heads/master@{#365183}
* [Blob] Fix for resetting reader.dmurph2015-12-152-6/+22
| | | | | | | | | R=michaeln BUG=567692 Review URL: https://codereview.chromium.org/1513783005 Cr-Commit-Position: refs/heads/master@{#365176}
* Implement QuotaManager::GetVolumeSize(path) and a test.michaeln2015-12-112-0/+40
| | | | | | Review URL: https://codereview.chromium.org/1492693002 Cr-Commit-Position: refs/heads/master@{#364801}
* Remove kuint64max.avi2015-12-093-23/+30
| | | | | | | | BUG=138542, 488550 Review URL: https://codereview.chromium.org/1502503004 Cr-Commit-Position: refs/heads/master@{#364133}
* Remove kint64max.avi2015-12-096-161/+171
| | | | | | | | BUG=138542,488550 Review URL: https://codereview.chromium.org/1498003003 Cr-Commit-Position: refs/heads/master@{#363854}
* Remove reference counting from URLRequestJob.mmenke2015-12-082-5/+6
| | | | | | | | | | | | | | The URLRequest now has control over its lifetime, so undead URLRequestJobs can't come back to haunt us after the request has been destroyed. Longer term, hopefully we'll be able to delete URLRequestJobs on cancellation. BUG=490668 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/1457043005 Cr-Commit-Position: refs/heads/master@{#363819}
* Do not do unnecessary recursive deletes for files.thestig2015-12-072-3/+3
| | | | | | Review URL: https://codereview.chromium.org/1471073008 Cr-Commit-Position: refs/heads/master@{#363419}
* [BlobAsync] Patch 4: Browser Classes & Logic.dmurph2015-12-0211-12/+948
| | | | | | | | | | | | | | | | | | | This patch encompasses all browser classes and logic for blob async transportation. This is a no-op. Patches: 1: https://codereview.chromium.org/1287303002 (committed) 2: https://codereview.chromium.org/1288373002 (committed) 3: https://codereview.chromium.org/1292523002 (committed) 4: https://codereview.chromium.org/1098853003 Hookup: https://codereview.chromium.org/1234813004 See https://bit.ly/BlobStorageRefactor BUG=375297 Review URL: https://codereview.chromium.org/1098853003 Cr-Commit-Position: refs/heads/master@{#362802}
* Remove old C++03 move emulation code.dcheng2015-12-012-9/+6
| | | | | | | | | | | Chrome allows the use of C++11 features now, so just use rvalue references directly. BUG=543901 Review URL: https://codereview.chromium.org/1407443002 Cr-Commit-Position: refs/heads/master@{#362394}
* Except already-deleted origins from eviction in QuotaTemporaryStorageEvictorcalamity2015-12-014-9/+20
| | | | | | | | | | | | | | | | This CL stores the eviction origins for the current eviction round in the QuotaTemporaryStorageEvictor so they can be passed as exceptions to QuotaManager::GetEvictionOrigin. This fixes an issue where the same origin was being chosen for eviction multiple times per round where the SiteEngagementEvictionPolicy would always the same origin, causing eviction to never terminate. BUG=557561 Review URL: https://codereview.chromium.org/1482563002 Cr-Commit-Position: refs/heads/master@{#362354}
* URLRequestJob: change ReadRawData contractxunjieli2015-11-236-84/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the interface for URLRequestJob::ReadRawData was as follows: bool ReadRawData(IOBuffer*, int, int*) Subclasses were expected to signal completion of the ReadRawData call by calling NotifyDone, SetStatus, or maybe one of the other Notify* functions on URLRequestJob, most of which do internal housekeeping and also drive the URLRequest's state machine. This made it difficult to reason about the URLRequestJob's state machine and needlessly complicated most of URLRequestJob. The new interface is as follows: int ReadRawData(IOBuffer*, int) Subclasses are required to either: a) Return ERR_IO_PENDING, and call ReadRawDataComplete when the read completes in any way, or b) Return a count of bytes read >= 0, indicating synchronous success, or c) Return another error code < 0, indicating synchronous failure. This substantially narrows the interface between URLRequestJob and its subclasses and moves the logic for the URLRequest state machine largely into URLRequestJob. Also, the signature of URLRequestJob::ReadFilteredData and some other internal URLRequestJob helpers changes to propagate detailed error codes instead of coercing all errors to FAILED. TBR=michaeln@chromium.org,mnaganov@chromium.org,skyostil@chromium.org,eugenebut@chromium.org,davidben@chromium.org,falken@chromium.org,mtomasz@chromium.org, sky@chromium.org,jianli@chromium.org,zork@chromium.org,rdsmith@chromium.org BUG=553300 Review URL: https://codereview.chromium.org/1467603002 Cr-Commit-Position: refs/heads/master@{#361158}
* Run gn --format over all .gn filesagrieve2015-11-201-1/+1
| | | | | | | | | | | | | | | | The recent formatter alphebetizing change is causing a lot of noise in code reviews. Figured it'd be worth a clean-up CL. Exact command I ran: find . -name "*.gn*" -exec gn format --in-place "{}" \; TBR=ddorwin@chromium.org BUG=554928 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1464873002 Cr-Commit-Position: refs/heads/master@{#360891}
* Use std::tie() for operator< in storage/jsbell2015-11-201-12/+5
| | | | | | | | | | | | Simplify the code for operator< when comparing multiple members using a common std::tie idiom. BUG=555171 R=danakj@chromium.org Review URL: https://codereview.chromium.org/1455403004 Cr-Commit-Position: refs/heads/master@{#360873}
* Revert "Reland: URLRequestJob: change ReadRawData contract"xunjieli2015-11-206-58/+84
| | | | | | | | | | | | | | | | | | | This reverts commit d77911ac82186d65a8f11555a7a6b1678c769ba2. The previous CL caused a top crasher on Canary. Reverting this CL now since fixing the crash isn't straightforward. TBR=michaeln@chromium.org,mnaganov@chromium.org,skyostil@chromium.org,eugenebut@chromium.org,davidben@chromium.org,falken@chromium.org,mtomasz@chromium.org, sky@chromium.org,jianli@chromium.org,zork@chromium.org,mmenke@chromium.org,rdsmith@chromium.org BUG=558224 BUG=553300 BUG=474859 BUG=329902 Review URL: https://codereview.chromium.org/1459333002 Cr-Commit-Position: refs/heads/master@{#360809}
* Add an option to specify requested fields for fetching metadata.mtomasz2015-11-1912-18/+42
| | | | | | | | | | | | | | | | | Fetching metadata is heavy, and it may cause calling stat() even though it's not needed (is_directory is obtainable without stat()). This CL adds the option. Backends will be updated to reflect it separately. Also, as another step base::File::Info will be replaced with storage::Entry or something similar with scoped_ptr's as members, to avoid reading a member which was not requested in |fields|. TEST=All current tests pass. But not really used yet, as backends ignore it. BUG=558191 Review URL: https://codereview.chromium.org/1455403003 Cr-Commit-Position: refs/heads/master@{#360585}
* Avoid ADL on base::DispatchToMethod in fileapitzik2015-11-181-2/+2
| | | | | | | | | | | | | | Call base::DispatchToMethod with fully qualified name. DispatchToMethod is pulled by ADL (Argument Dependent Lookup) rule on base::Tuple in TaskRunnerBoundObserverList. That is going to unavailable after we start using std::tuple as the replacement of base::Tuple. BUG=554987 Review URL: https://codereview.chromium.org/1456673003 Cr-Commit-Position: refs/heads/master@{#360426}
* Reland: URLRequestJob: change ReadRawData contractxunjieli2015-11-186-84/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL is to reland crrev.com/1410643007 which was reverted in crrev.com/1437523002. Previously, the interface for URLRequestJob::ReadRawData was as follows: bool ReadRawData(IOBuffer*, int, int*) Subclasses were expected to signal completion of the ReadRawData call by calling NotifyDone, SetStatus, or maybe one of the other Notify* functions on URLRequestJob, most of which do internal housekeeping and also drive the URLRequest's state machine. This made it difficult to reason about the URLRequestJob's state machine and needlessly complicated most of URLRequestJob. The new interface is as follows: int ReadRawData(IOBuffer*, int) Subclasses are required to either: a) Return ERR_IO_PENDING, and call ReadRawDataComplete when the read completes in any way, or b) Return a count of bytes read >= 0, indicating synchronous success, or c) Return another error code < 0, indicating synchronous failure. This substantially narrows the interface between URLRequestJob and its subclasses and moves the logic for the URLRequest state machine largely into URLRequestJob. Also, the signature of URLRequestJob::ReadFilteredData and some other internal URLRequestJob helpers changes to propagate detailed error codes instead of coercing all errors to FAILED. TBR=michaeln@chromium.org,mtomasz@chromium.org,jianli@chromium.org,zork@chromium.org BUG=474859 BUG=329902 Review URL: https://codereview.chromium.org/1439953006 Cr-Commit-Position: refs/heads/master@{#360327}
* Do not call stat() when reading directories via File API.mtomasz2015-11-155-24/+56
| | | | | | | | | | | | | It's very heavy, and on the JavaScript side the metadata is discarded anyway, and another call is used to obtain it. TEST=All existing tests should pass. Tested manually with MTP and chrome://quota-internals, then filesystem://.../isolated in the browser. BUG=None Review URL: https://codereview.chromium.org/1432403003 Cr-Commit-Position: refs/heads/master@{#359768}
* Revert "URLRequestJob: change ReadRawData contract"xunjieli2015-11-096-57/+83
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a505cbb45ec92d2617fe80490acf7d01ef4d3225. Revert "Disable http/tests/serviceworker/registration.html" This reverts commit e2bf349b84f10e940b5ebe5a8fcaf2cf8c8eb322. Revert "Remove incorrect DCHECK_NE in ServiceWorkerWriteToCacheJob::OnReadCompleted." This reverts commit 5b28d0b0efd8a75a9ad783bd849fa41eb9339a3b. Revert "Do not call NotifyDone in URLRequestJob::ReadRawDataComplete if ERR_IO_PENDING" This reverts commit 876da269322a66d5e2741de0892e01b24ab98065. TBR=michaeln@chromium.org,mnaganov@chromium.org,skyostil@chromium.org,eugenebut@chromium.org,davidben@chromium.org,falken@chromium.org,mtomasz@chromium.org, sky@chromium.org,jianli@chromium.org,zork@chromium.org BUG=553300 BUG=474859 Review URL: https://codereview.chromium.org/1437523002 Cr-Commit-Position: refs/heads/master@{#358686}
* Deprecate STORAGE_EXPORT_PRIVATE macro.xhwang2015-11-0623-46/+33
| | | | | | | | | | Replace STORAGE_EXPORT_PRIVATE with STORAGE_EXPORT since they are the same. BUG=552248 Review URL: https://codereview.chromium.org/1429333002 Cr-Commit-Position: refs/heads/master@{#358354}
* URLRequestJob: change ReadRawData contractxunjieli2015-11-066-83/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL is patched from ellyjones@ CL at crrev.com/1227893004. Previously, the interface for URLRequestJob::ReadRawData was as follows: bool ReadRawData(IOBuffer*, int, int*) Subclasses were expected to signal completion of the ReadRawData call by calling NotifyDone, SetStatus, or maybe one of the other Notify* functions on URLRequestJob, most of which do internal housekeeping and also drive the URLRequest's state machine. This made it difficult to reason about the URLRequestJob's state machine and needlessly complicated most of URLRequestJob. The new interface is as follows: int ReadRawData(IOBuffer*, int) Subclasses are required to either: a) Return ERR_IO_PENDING, and call ReadRawDataComplete when the read completes in any way, or b) Return a count of bytes read >= 0, indicating synchronous success, or c) Return another error code < 0, indicating synchronous failure. This substantially narrows the interface between URLRequestJob and its subclasses and moves the logic for the URLRequest state machine largely into URLRequestJob. Also, the signature of URLRequestJob::ReadFilteredData and some other internal URLRequestJob helpers changes to propagate detailed error codes instead of coercing all errors to FAILED. BUG=474859 BUG=329902 Review URL: https://codereview.chromium.org/1410643007 Cr-Commit-Position: refs/heads/master@{#358327}
* Add access count and time-since-accessed histograms to temp storage eviction.calamity2015-11-064-20/+75
| | | | | | | | | | | | This CL adds the Quota.EvictedOriginAccessCount and Quota.EvictedOriginTimeSinceAccess histograms that track how many time an evicted origin has been used and how long since it has been used respectively. BUG=542075 Review URL: https://codereview.chromium.org/1424653002 Cr-Commit-Position: refs/heads/master@{#358210}
* [BlobAsync] Patch 3: Renderer Classes & Logicdmurph2015-10-318-73/+82
| | | | | | | | | | | | | | | | | Note: This patch is a no-op. Patches: 1: https://codereview.chromium.org/1287303002 2: https://codereview.chromium.org/1288373002 3: https://codereview.chromium.org/1292523002 4: https://codereview.chromium.org/1098853003 Hookup: https://codereview.chromium.org/1234813004 BUG=375297 Review URL: https://codereview.chromium.org/1292523002 Cr-Commit-Position: refs/heads/master@{#357258}
* [BlobAsync] Patch 2: Common Constantsdmurph2015-10-3115-4/+521
| | | | | | | | | | | | | | | | | | | | This CL contains constants for the Blob Async Transport refactor. Note: This CL is currently a no-op, hookup is in the 'Hookup' patch. Patches: 1: https://codereview.chromium.org/1287303002 (Committed!) 2: https://codereview.chromium.org/1288373002 3: https://codereview.chromium.org/1292523002 4: https://codereview.chromium.org/1098853003 Hookup: https://codereview.chromium.org/1234813004 BUG=375297 Review URL: https://codereview.chromium.org/1288373002 Cr-Commit-Position: refs/heads/master@{#357248}
* WebSQL: Avoid running nested message loops during renderer shutdown.michaeln2015-10-292-34/+28
| | | | | | | | | | Instead, block the main thread while waiting for databases to close. If they don't close quickly enough, use CHECK to end the process. BUG=472618 Review URL: https://codereview.chromium.org/1413093004 Cr-Commit-Position: refs/heads/master@{#356755}
* [sql] QuotaDatabase schema upgrade doesn't use transactions right.michaeln2015-10-282-19/+34
| | | | | | | | BUG=548371 Review URL: https://codereview.chromium.org/1419573008 Cr-Commit-Position: refs/heads/master@{#356675}
* Remove base::MessageLoop::{Quit,QuitClosure} functionski.stfu2015-10-231-1/+1
| | | | | | | | | | | | | This patch removes aliases for base::MessageLoop::QuitWhenIdle & base::MessageLoop::QuitWhenIdleClosure, and includes minor formatting changes made by using git cl-format. BUG=131220 TEST= R=danakj@chromium.org,brettw@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1390513002 Cr-Commit-Position: refs/heads/master@{#355763}
* Exclude in-use origins from storage evictions for all QuotaEvictionPolicies.calamity2015-10-212-41/+42
| | | | | | | | | | | | This CL adds exceptions to the QuotaEvictionPolicy interface which are used to prevent in-use origins from being evicted and implements handling of origin exceptions in the SiteEngagementEvictionPolicy. BUG=464234 Review URL: https://codereview.chromium.org/1354543002 Cr-Commit-Position: refs/heads/master@{#355236}
* Add Quota.TimeSinceOriginEvicted UMA histogram.calamity2015-10-204-44/+183
| | | | | | | | | | | | | This CL adds a UMA histogram that tracks the amount of time since an origin last had its temporary storage evicted. The last eviction time data is stored by adding a table to the QuotaManager database which tracks the last eviction time for an origin. BUG=542075 Review URL: https://codereview.chromium.org/1403673002 Cr-Commit-Position: refs/heads/master@{#354932}
* [BlobAsync] Patch 1: BlobStorageRegistrydmurph2015-10-145-0/+229
| | | | | | | | | | | | | | | | | Note: This patch is a no-op, and will be hooked up in a later patch. Patches: 1: https://codereview.chromium.org/1287303002 2: https://codereview.chromium.org/1288373002 3: https://codereview.chromium.org/1292523002 4: https://codereview.chromium.org/1098853003 Hookup: https://codereview.chromium.org/1234813004 BUG=375297 Review URL: https://codereview.chromium.org/1287303002 Cr-Commit-Position: refs/heads/master@{#354050}
* Integrate SiteEngagementEvictionPolicy with QuotaManager.calamity2015-10-147-9/+78
| | | | | | | | | | | | | | | | | | This CL hooks the SiteEngagementEvictionPolicy to get its usage map and global quota values from the QuotaManager and then sending them to the UI thread for calculation. This CL also adds a test that verifies that this plumbing completes as expected. Actually instantiating the SiteEngagementEvictionPolicy in the business codepath will be implemented at a later date. BUG=464234 Review URL: https://codereview.chromium.org/1343273003 Cr-Commit-Position: refs/heads/master@{#353961}
* Use INT64_MAX to avoid global object constructorsbrucedawson2015-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | Using std::numeric_limits<int64>::max(); to initialize a global variable can easily lead to initialization code running at startup, which is bad. Doing this on a const variable declared in a header file has the potential to trigger *many* constructors because the const (implicitly static) variables may be created in many translation units. Using "= INT64_MAX;" ensures that all is done at compile time and the integral constants will not be allocated storage. See this discussion for details: https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/Bvd9QU5pY9Q/m-VVOSKiKwAJ R=tzik@chromium.org Review URL: https://codereview.chromium.org/1398803004 Cr-Commit-Position: refs/heads/master@{#353854}
* Add trace to the caller of QuotaManager::GetAvailableSpace and its callbacks ↵oshima2015-10-106-1/+112
| | | | | | | | | | | | (where possible). BUG=349708 R=kinuko@chromium.org TBR=tzik@chromium.org Review URL: https://codereview.chromium.org/1394563002 Cr-Commit-Position: refs/heads/master@{#353449}
* [Blob] BlobReader class & tests, and removal of all redundant reading.dmurph2015-09-3014-546/+1108
| | | | | | | | | | | | | | | | | | | | | | | * New BlobReader class & tests * Removal of other reading code, which now uses the BlobReader * Removal of unnecessary UploadDiskCacheEntryElementReader * Removal of blob expansion logic in UploadDataStreamBuilder Now it's very easy for anyone in browserland to read blobs instead of having to do url requests, and it's also easy for anyone to add new blob backing storage. This is a prerequisite for the new blob async transportation, see here: goto/BlobPaging BUG=138051,375297 Committed: https://crrev.com/02561552a57ed8792a8ebb2676bad485e1d99605 Cr-Commit-Position: refs/heads/master@{#351470} Review URL: https://codereview.chromium.org/1337153002 Cr-Commit-Position: refs/heads/master@{#351611}