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

Side by Side Diff: content/browser/service_worker/service_worker_browsertest.cc

Issue 2242883002: [CacheStorage] Use QueryCache everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from PS9 Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 int* result, 1705 int* result,
1706 const base::Closure& continuation, 1706 const base::Closure& continuation,
1707 std::unique_ptr<CacheStorageCacheHandle> cache_handle, 1707 std::unique_ptr<CacheStorageCacheHandle> cache_handle,
1708 CacheStorageError error) { 1708 CacheStorageError error) {
1709 ASSERT_EQ(CACHE_STORAGE_OK, error); 1709 ASSERT_EQ(CACHE_STORAGE_OK, error);
1710 std::unique_ptr<ServiceWorkerFetchRequest> scoped_request( 1710 std::unique_ptr<ServiceWorkerFetchRequest> scoped_request(
1711 new ServiceWorkerFetchRequest()); 1711 new ServiceWorkerFetchRequest());
1712 scoped_request->url = url_; 1712 scoped_request->url = url_;
1713 CacheStorageCache* cache = cache_handle->value(); 1713 CacheStorageCache* cache = cache_handle->value();
1714 cache->Match( 1714 cache->Match(
1715 std::move(scoped_request), 1715 std::move(scoped_request), CacheStorageCacheQueryParams(),
1716 base::Bind(&self::OnCacheStorageCacheMatchCallback, this, result, 1716 base::Bind(&self::OnCacheStorageCacheMatchCallback, this, result,
1717 continuation, base::Passed(std::move(cache_handle)))); 1717 continuation, base::Passed(std::move(cache_handle))));
1718 } 1718 }
1719 1719
1720 void OnCacheStorageCacheMatchCallback( 1720 void OnCacheStorageCacheMatchCallback(
1721 int* result, 1721 int* result,
1722 const base::Closure& continuation, 1722 const base::Closure& continuation,
1723 std::unique_ptr<CacheStorageCacheHandle> cache_handle, 1723 std::unique_ptr<CacheStorageCacheHandle> cache_handle,
1724 CacheStorageError error, 1724 CacheStorageError error,
1725 std::unique_ptr<ServiceWorkerResponse> response, 1725 std::unique_ptr<ServiceWorkerResponse> response,
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 2025
2026 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) { 2026 IN_PROC_BROWSER_TEST_F(ServiceWorkerDisableWebSecurityTest, UpdateNoCrash) {
2027 const char kPageUrl[] = "/service_worker/disable_web_security_update.html"; 2027 const char kPageUrl[] = "/service_worker/disable_web_security_update.html";
2028 const char kScopeUrl[] = "/service_worker/scope/"; 2028 const char kScopeUrl[] = "/service_worker/scope/";
2029 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js"; 2029 const char kWorkerUrl[] = "/service_worker/fetch_event_blob.js";
2030 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl); 2030 RegisterServiceWorkerOnCrossOriginServer(kScopeUrl, kWorkerUrl);
2031 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl); 2031 RunTestWithCrossOriginURL(kPageUrl, kScopeUrl);
2032 } 2032 }
2033 2033
2034 } // namespace content 2034 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/cache_storage/cache_storage_manager_unittest.cc ('k') | content/common/cache_storage/cache_storage_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698