summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/mock_appcache_storage_unittest.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 04:16:27 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-01 04:16:27 +0000
commitad8e04ac88be37d5ccb6c2cf61f52b224dca493c (patch)
tree9bcb878643bdd9e5af6749fff469b2552e569907 /webkit/appcache/mock_appcache_storage_unittest.cc
parent5af8043eb24ad60251d8a4e33192e3e6f59246a3 (diff)
downloadchromium_src-ad8e04ac88be37d5ccb6c2cf61f52b224dca493c.zip
chromium_src-ad8e04ac88be37d5ccb6c2cf61f52b224dca493c.tar.gz
chromium_src-ad8e04ac88be37d5ccb6c2cf61f52b224dca493c.tar.bz2
Convert implicit scoped_refptr constructor calls to explicit ones, part 1
This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/mock_appcache_storage_unittest.cc')
-rw-r--r--webkit/appcache/mock_appcache_storage_unittest.cc60
1 files changed, 30 insertions, 30 deletions
diff --git a/webkit/appcache/mock_appcache_storage_unittest.cc b/webkit/appcache/mock_appcache_storage_unittest.cc
index 5be333a..3bd8ca6 100644
--- a/webkit/appcache/mock_appcache_storage_unittest.cc
+++ b/webkit/appcache/mock_appcache_storage_unittest.cc
@@ -92,7 +92,7 @@ TEST_F(MockAppCacheStorageTest, LoadCache_NearHit) {
// Setup some preconditions. Make an 'unstored' cache for
// us to load. The ctor should put it in the working set.
int64 cache_id = service.storage()->NewCacheId();
- scoped_refptr<AppCache> cache = new AppCache(&service, cache_id);
+ scoped_refptr<AppCache> cache(new AppCache(&service, cache_id));
// Conduct the test.
MockStorageDelegate delegate;
@@ -157,10 +157,10 @@ TEST_F(MockAppCacheStorageTest, LoadGroupAndCache_FarHit) {
// Setup some preconditions. Create a group and newest cache that
// appears to be "stored" and "not currently in use".
GURL manifest_url("http://blah/");
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, manifest_url, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, manifest_url, 111));
int64 cache_id = storage->NewCacheId();
- scoped_refptr<AppCache> cache = new AppCache(&service, cache_id);
+ scoped_refptr<AppCache> cache(new AppCache(&service, cache_id));
cache->set_complete(true);
group->AddCache(cache);
storage->AddStoredGroup(group);
@@ -208,10 +208,10 @@ TEST_F(MockAppCacheStorageTest, StoreNewGroup) {
// Setup some preconditions. Create a group and newest cache that
// appears to be "unstored".
GURL manifest_url("http://blah/");
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, manifest_url, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, manifest_url, 111));
int64 cache_id = storage->NewCacheId();
- scoped_refptr<AppCache> cache = new AppCache(&service, cache_id);
+ scoped_refptr<AppCache> cache(new AppCache(&service, cache_id));
// Hold a ref to the cache simulate the UpdateJob holding that ref,
// and hold a ref to the group to simulate the CacheHost holding that ref.
@@ -240,16 +240,16 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroup) {
// Setup some preconditions. Create a group and old complete cache
// that appear to be "stored", and a newest unstored complete cache.
GURL manifest_url("http://blah/");
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, manifest_url, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, manifest_url, 111));
int64 old_cache_id = storage->NewCacheId();
- scoped_refptr<AppCache> old_cache = new AppCache(&service, old_cache_id);
+ scoped_refptr<AppCache> old_cache(new AppCache(&service, old_cache_id));
old_cache->set_complete(true);
group->AddCache(old_cache);
storage->AddStoredGroup(group);
storage->AddStoredCache(old_cache);
int64 new_cache_id = storage->NewCacheId();
- scoped_refptr<AppCache> new_cache = new AppCache(&service, new_cache_id);
+ scoped_refptr<AppCache> new_cache(new AppCache(&service, new_cache_id));
// Hold our refs to simulate the UpdateJob holding these refs.
// Conduct the test.
@@ -283,10 +283,10 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroupExistingCache) {
// Setup some preconditions. Create a group and a complete cache that
// appear to be "stored".
GURL manifest_url("http://blah");
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, manifest_url, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, manifest_url, 111));
int64 cache_id = storage->NewCacheId();
- scoped_refptr<AppCache> cache = new AppCache(&service, cache_id);
+ scoped_refptr<AppCache> cache(new AppCache(&service, cache_id));
cache->set_complete(true);
group->AddCache(cache);
storage->AddStoredGroup(group);
@@ -325,10 +325,10 @@ TEST_F(MockAppCacheStorageTest, MakeGroupObsolete) {
// Setup some preconditions. Create a group and newest cache that
// appears to be "stored" and "currently in use".
GURL manifest_url("http://blah/");
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, manifest_url, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, manifest_url, 111));
int64 cache_id = storage->NewCacheId();
- scoped_refptr<AppCache> cache = new AppCache(&service, cache_id);
+ scoped_refptr<AppCache> cache(new AppCache(&service, cache_id));
cache->set_complete(true);
group->AddCache(cache);
storage->AddStoredGroup(group);
@@ -370,7 +370,7 @@ TEST_F(MockAppCacheStorageTest, MarkEntryAsForeign) {
// Setup some preconditions. Create a cache with an entry.
GURL entry_url("http://blah/entry");
int64 cache_id = storage->NewCacheId();
- scoped_refptr<AppCache> cache = new AppCache(&service, cache_id);
+ scoped_refptr<AppCache> cache(new AppCache(&service, cache_id));
cache->AddEntry(entry_url, AppCacheEntry(AppCacheEntry::EXPLICIT));
// Conduct the test.
@@ -414,12 +414,12 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainResponse) {
const GURL kEntryUrl("http://blah/entry");
const GURL kManifestUrl("http://blah/manifest");
const int64 kResponseId = 1;
- scoped_refptr<AppCache> cache = new AppCache(&service, kCacheId);
+ scoped_refptr<AppCache> cache(new AppCache(&service, kCacheId));
cache->AddEntry(
kEntryUrl, AppCacheEntry(AppCacheEntry::EXPLICIT, kResponseId));
cache->set_complete(true);
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, kManifestUrl, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, kManifestUrl, 111));
group->AddCache(cache);
storage->AddStoredGroup(group);
storage->AddStoredCache(cache);
@@ -461,7 +461,7 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainFallbackResponse) {
manifest.fallback_namespaces.push_back(
FallbackNamespace(kFallbackNamespaceUrl2, kFallbackEntryUrl2));
- scoped_refptr<AppCache> cache = new AppCache(&service, kCacheId);
+ scoped_refptr<AppCache> cache(new AppCache(&service, kCacheId));
cache->InitializeWithManifest(&manifest);
cache->AddEntry(
kFallbackEntryUrl1, AppCacheEntry(AppCacheEntry::FALLBACK, kResponseId1));
@@ -469,8 +469,8 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainFallbackResponse) {
kFallbackEntryUrl2, AppCacheEntry(AppCacheEntry::FALLBACK, kResponseId2));
cache->set_complete(true);
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, kManifestUrl, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, kManifestUrl, 111));
group->AddCache(cache);
storage->AddStoredGroup(group);
storage->AddStoredCache(cache);
@@ -511,12 +511,12 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseWithMultipleCandidates) {
const int64 kResponseId2 = 2;
// The first cache.
- scoped_refptr<AppCache> cache = new AppCache(&service, kCacheId1);
+ scoped_refptr<AppCache> cache(new AppCache(&service, kCacheId1));
cache->AddEntry(
kEntryUrl, AppCacheEntry(AppCacheEntry::EXPLICIT, kResponseId1));
cache->set_complete(true);
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, kManifestUrl1, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, kManifestUrl1, 111));
group->AddCache(cache);
storage->AddStoredGroup(group);
storage->AddStoredCache(cache);
@@ -567,15 +567,15 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseExclusions) {
Manifest manifest;
manifest.online_whitelist_namespaces.push_back(kOnlineNamespaceUrl);
- scoped_refptr<AppCache> cache = new AppCache(&service, kCacheId);
+ scoped_refptr<AppCache> cache(new AppCache(&service, kCacheId));
cache->InitializeWithManifest(&manifest);
cache->AddEntry(
kEntryUrl,
AppCacheEntry(AppCacheEntry::EXPLICIT | AppCacheEntry::FOREIGN,
kResponseId));
cache->set_complete(true);
- scoped_refptr<AppCacheGroup> group =
- new AppCacheGroup(&service, kManifestUrl, 111);
+ scoped_refptr<AppCacheGroup> group(
+ new AppCacheGroup(&service, kManifestUrl, 111));
group->AddCache(cache);
storage->AddStoredGroup(group);
storage->AddStoredCache(cache);