gecko-dev/netwerk/cache2/PinningCacheStorage.cpp
Valentin Gosu 30be843b5b Bug 1032254 - Provide a way to pin resources in the http cache r=honzab
--HG--
rename : netwerk/test/unit/test_cache2-28-concurrent_read_resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29a-concurrent_read_resumable_entry_size_zero.js
rename : netwerk/test/unit/test_cache2-29-concurrent_read_non-resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29b-concurrent_read_non-resumable_entry_size_zero.js
2015-07-30 11:40:00 +02:00

26 lines
545 B
C++

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "PinningCacheStorage.h"
namespace mozilla {
namespace net {
bool PinningCacheStorage::IsPinning() const
{
if (LoadInfo()->AppId() == nsILoadContextInfo::NO_APP_ID) {
return false;
}
if (LoadInfo()->IsPrivate()) {
return false;
}
// We are a non-private app load, pin!
return true;
}
} // net
} // mozilla