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

Side by Side Diff: content/browser/background_sync/background_sync_browsertest.cc

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ServiceWorkerContextCore::DidFindRegistrationForCheckHasServiceWorker() 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
« no previous file with comments | « no previous file | content/browser/background_sync/background_sync_manager.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 } 84 }
85 ADD_FAILURE() << "Registration should exist"; 85 ADD_FAILURE() << "Registration should exist";
86 } 86 }
87 87
88 void RegistrationPendingDidGetSWRegistration( 88 void RegistrationPendingDidGetSWRegistration(
89 const scoped_refptr<BackgroundSyncContext> sync_context, 89 const scoped_refptr<BackgroundSyncContext> sync_context,
90 const std::string& tag, 90 const std::string& tag,
91 const base::Callback<void(bool)>& callback, 91 const base::Callback<void(bool)>& callback,
92 ServiceWorkerStatusCode status, 92 ServiceWorkerStatusCode status,
93 const scoped_refptr<ServiceWorkerRegistration>& registration) { 93 scoped_refptr<ServiceWorkerRegistration> registration) {
94 ASSERT_EQ(SERVICE_WORKER_OK, status); 94 ASSERT_EQ(SERVICE_WORKER_OK, status);
95 int64_t service_worker_id = registration->id(); 95 int64_t service_worker_id = registration->id();
96 BackgroundSyncManager* sync_manager = sync_context->background_sync_manager(); 96 BackgroundSyncManager* sync_manager = sync_context->background_sync_manager();
97 sync_manager->GetRegistrations( 97 sync_manager->GetRegistrations(
98 service_worker_id, 98 service_worker_id,
99 base::Bind(&RegistrationPendingDidGetSyncRegistration, tag, callback)); 99 base::Bind(&RegistrationPendingDidGetSyncRegistration, tag, callback));
100 } 100 }
101 101
102 void RegistrationPendingOnIOThread( 102 void RegistrationPendingOnIOThread(
103 const scoped_refptr<BackgroundSyncContext> sync_context, 103 const scoped_refptr<BackgroundSyncContext> sync_context,
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 IN_PROC_BROWSER_TEST_F(BackgroundSyncBrowserTest, 680 IN_PROC_BROWSER_TEST_F(BackgroundSyncBrowserTest,
681 RegisterFromServiceWorkerWithoutMainFrameHost) { 681 RegisterFromServiceWorkerWithoutMainFrameHost) {
682 std::string script_result; 682 std::string script_result;
683 EXPECT_TRUE( 683 EXPECT_TRUE(
684 RegisterFromCrossOriginFrame(kRegisterSyncFromSWURL, &script_result)); 684 RegisterFromCrossOriginFrame(kRegisterSyncFromSWURL, &script_result));
685 EXPECT_EQ(BuildExpectedResult("frame", "failed to register sync"), 685 EXPECT_EQ(BuildExpectedResult("frame", "failed to register sync"),
686 script_result); 686 script_result);
687 } 687 }
688 688
689 } // namespace content 689 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/background_sync/background_sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698