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

Side by Side Diff: content/browser/appcache/chrome_appcache_service_unittest.cc

Issue 2283373002: Remove unneeded scoped_refptr<>::get() on method binding (Closed)
Patch Set: Created 4 years, 3 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 new MockSpecialStoragePolicy; 98 new MockSpecialStoragePolicy;
99 mock_policy->AddProtected(kProtectedManifestURL.GetOrigin()); 99 mock_policy->AddProtected(kProtectedManifestURL.GetOrigin());
100 mock_policy->AddSessionOnly(kSessionOnlyManifestURL.GetOrigin()); 100 mock_policy->AddSessionOnly(kSessionOnlyManifestURL.GetOrigin());
101 scoped_refptr<MockURLRequestContextGetter> mock_request_context_getter = 101 scoped_refptr<MockURLRequestContextGetter> mock_request_context_getter =
102 new MockURLRequestContextGetter( 102 new MockURLRequestContextGetter(
103 browser_context_.GetResourceContext()->GetRequestContext(), 103 browser_context_.GetResourceContext()->GetRequestContext(),
104 message_loop_.task_runner().get()); 104 message_loop_.task_runner().get());
105 BrowserThread::PostTask( 105 BrowserThread::PostTask(
106 BrowserThread::IO, FROM_HERE, 106 BrowserThread::IO, FROM_HERE,
107 base::Bind(&ChromeAppCacheService::InitializeOnIOThread, 107 base::Bind(&ChromeAppCacheService::InitializeOnIOThread,
108 appcache_service.get(), appcache_path, 108 appcache_service, appcache_path,
109 browser_context_.GetResourceContext(), 109 browser_context_.GetResourceContext(),
110 base::RetainedRef(mock_request_context_getter), mock_policy)); 110 base::RetainedRef(mock_request_context_getter), mock_policy));
111 // Steps needed to initialize the storage of AppCache data. 111 // Steps needed to initialize the storage of AppCache data.
112 base::RunLoop().RunUntilIdle(); 112 base::RunLoop().RunUntilIdle();
113 if (init_storage) { 113 if (init_storage) {
114 AppCacheStorageImpl* storage = 114 AppCacheStorageImpl* storage =
115 static_cast<AppCacheStorageImpl*>( 115 static_cast<AppCacheStorageImpl*>(
116 appcache_service->storage()); 116 appcache_service->storage());
117 storage->database_->db_connection(); 117 storage->database_->db_connection();
118 storage->disk_cache(); 118 storage->disk_cache();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 EXPECT_TRUE(origins.find(kNormalManifestURL.GetOrigin()) != origins.end()); 209 EXPECT_TRUE(origins.find(kNormalManifestURL.GetOrigin()) != origins.end());
210 EXPECT_TRUE(origins.find(kSessionOnlyManifestURL.GetOrigin()) != 210 EXPECT_TRUE(origins.find(kSessionOnlyManifestURL.GetOrigin()) !=
211 origins.end()); 211 origins.end());
212 212
213 // Delete and let cleanup tasks run prior to returning. 213 // Delete and let cleanup tasks run prior to returning.
214 appcache_service = NULL; 214 appcache_service = NULL;
215 base::RunLoop().RunUntilIdle(); 215 base::RunLoop().RunUntilIdle();
216 } 216 }
217 217
218 } // namespace content 218 } // namespace content
OLDNEW
« no previous file with comments | « components/sync/driver/non_ui_data_type_controller_unittest.cc ('k') | content/browser/indexed_db/indexed_db_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698