Use multiline attribute to check for IA2_STATE_MULTILINE.
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_register_job_base.h
bloba35162d7e0acc3eaa8454cee1b61fcd70ab95f14
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_BASE_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_BASE_H_
8 namespace content {
10 class ServiceWorkerRegisterJobBase {
11 public:
12 enum RegistrationJobType {
13 REGISTRATION_JOB,
14 UNREGISTRATION_JOB,
15 UPDATE_JOB
18 virtual ~ServiceWorkerRegisterJobBase() {}
20 // Starts the job. This method should be called once and only once per job.
21 virtual void Start() = 0;
23 // Aborts the job. This method should be called once and only once per job.
24 // It can be called regardless of whether Start() was called.
25 virtual void Abort() = 0;
27 // Returns true if this job is identical to |job| for the purpose of
28 // collapsing them together in a ServiceWorkerJobCoordinator queue.
29 // Registration jobs are equal if they are for the same pattern and script
30 // URL; unregistration jobs are equal if they are for the same pattern.
31 virtual bool Equals(ServiceWorkerRegisterJobBase* job) const = 0;
33 // Returns the type of this job.
34 virtual RegistrationJobType GetType() const = 0;
37 } // namespace content
39 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_BASE_H_