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

Side by Side Diff: webkit/appcache/appcache_storage_impl_unittest.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_storage_impl.cc ('k') | webkit/appcache/appcache_storage_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <stack> 5 #include <stack>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/thread.h" 8 #include "base/thread.h"
9 #include "base/waitable_event.h" 9 #include "base/waitable_event.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // LoadCache_NearHit ------------------------------------------------- 309 // LoadCache_NearHit -------------------------------------------------
310 310
311 void LoadCache_NearHit() { 311 void LoadCache_NearHit() {
312 // Attempt to load a cache that is currently in use 312 // Attempt to load a cache that is currently in use
313 // and does not require loading from storage. This 313 // and does not require loading from storage. This
314 // load should complete syncly. 314 // load should complete syncly.
315 315
316 // Setup some preconditions. Make an 'unstored' cache for 316 // Setup some preconditions. Make an 'unstored' cache for
317 // us to load. The ctor should put it in the working set. 317 // us to load. The ctor should put it in the working set.
318 int64 cache_id = storage()->NewCacheId(); 318 int64 cache_id = storage()->NewCacheId();
319 scoped_refptr<AppCache> cache = new AppCache(service(), cache_id); 319 scoped_refptr<AppCache> cache(new AppCache(service(), cache_id));
320 320
321 // Conduct the test. 321 // Conduct the test.
322 storage()->LoadCache(cache_id, delegate()); 322 storage()->LoadCache(cache_id, delegate());
323 EXPECT_EQ(cache_id, delegate()->loaded_cache_id_); 323 EXPECT_EQ(cache_id, delegate()->loaded_cache_id_);
324 EXPECT_EQ(cache.get(), delegate()->loaded_cache_.get()); 324 EXPECT_EQ(cache.get(), delegate()->loaded_cache_.get());
325 TestFinished(); 325 TestFinished();
326 } 326 }
327 327
328 // CreateGroup -------------------------------------------- 328 // CreateGroup --------------------------------------------
329 329
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 &AppCacheStorageImplTest::FindMainResponseExclusionsInWorkingSet); 1115 &AppCacheStorageImplTest::FindMainResponseExclusionsInWorkingSet);
1116 } 1116 }
1117 1117
1118 // That's all folks! 1118 // That's all folks!
1119 1119
1120 } // namespace appcache 1120 } // namespace appcache
1121 1121
1122 // AppCacheStorageImplTest is expected to always live longer than the 1122 // AppCacheStorageImplTest is expected to always live longer than the
1123 // runnable methods. This lets us call NewRunnableMethod on its instances. 1123 // runnable methods. This lets us call NewRunnableMethod on its instances.
1124 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheStorageImplTest); 1124 DISABLE_RUNNABLE_METHOD_REFCOUNT(appcache::AppCacheStorageImplTest);
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_storage_impl.cc ('k') | webkit/appcache/appcache_storage_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698