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

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

Issue 1348603003: [BackgroundSync] Move BackgroundSyncState from proto to mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android fix Created 5 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 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool result) { 56 bool result) {
57 *result_out = result; 57 *result_out = result;
58 task_runner->PostTask(FROM_HERE, quit); 58 task_runner->PostTask(FROM_HERE, quit);
59 } 59 }
60 60
61 void OneShotPendingDidGetSyncRegistration( 61 void OneShotPendingDidGetSyncRegistration(
62 const base::Callback<void(bool)>& callback, 62 const base::Callback<void(bool)>& callback,
63 BackgroundSyncStatus error_type, 63 BackgroundSyncStatus error_type,
64 scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle) { 64 scoped_ptr<BackgroundSyncRegistrationHandle> registration_handle) {
65 ASSERT_EQ(BACKGROUND_SYNC_STATUS_OK, error_type); 65 ASSERT_EQ(BACKGROUND_SYNC_STATUS_OK, error_type);
66 callback.Run(registration_handle->sync_state() == SYNC_STATE_PENDING); 66 callback.Run(registration_handle->sync_state() ==
67 BACKGROUND_SYNC_STATE_PENDING);
67 } 68 }
68 69
69 void OneShotPendingDidGetSWRegistration( 70 void OneShotPendingDidGetSWRegistration(
70 const scoped_refptr<BackgroundSyncContext> sync_context, 71 const scoped_refptr<BackgroundSyncContext> sync_context,
71 const std::string& tag, 72 const std::string& tag,
72 const base::Callback<void(bool)>& callback, 73 const base::Callback<void(bool)>& callback,
73 ServiceWorkerStatusCode status, 74 ServiceWorkerStatusCode status,
74 const scoped_refptr<ServiceWorkerRegistration>& registration) { 75 const scoped_refptr<ServiceWorkerRegistration>& registration) {
75 ASSERT_EQ(SERVICE_WORKER_OK, status); 76 ASSERT_EQ(SERVICE_WORKER_OK, status);
76 int64 service_worker_id = registration->id(); 77 int64 service_worker_id = registration->id();
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 EXPECT_TRUE(RegisterServiceWorker()); 417 EXPECT_TRUE(RegisterServiceWorker());
417 EXPECT_TRUE(LoadTestPage(kDefaultTestURL)); // Control the page. 418 EXPECT_TRUE(LoadTestPage(kDefaultTestURL)); // Control the page.
418 419
419 EXPECT_TRUE(RegisterOneShot("unregister")); 420 EXPECT_TRUE(RegisterOneShot("unregister"));
420 EXPECT_TRUE(PopConsole("ok - unregister completed")); 421 EXPECT_TRUE(PopConsole("ok - unregister completed"));
421 } 422 }
422 423
423 } // namespace 424 } // namespace
424 425
425 } // namespace content 426 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/background_sync/background_sync.proto ('k') | content/browser/background_sync/background_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698