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

Side by Side Diff: content/public/common/push_messaging_status.h

Issue 366323002: Push API: use an enum to indicate status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Tweak mock error message. Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_
6 #define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_
7
8 namespace content {
9
10 enum PushMessagingStatus {
11 // Everything is ok.
12 PUSH_MESSAGING_STATUS_OK,
13
14 // Registration failed because there is no Service Worker.
15 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_NO_SERVICE_WORKER,
16
17 // Registration failed because the push service is not available.
18 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_NOT_AVAILABLE,
19
20 // Registration failed because the maximum number of registratons has been
21 // reached.
22 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_LIMIT_REACHED,
23
24 // Registration failed because permission was denied.
25 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_PERMISSION_DENIED,
26
27 // Registration failed in the push service implemented by the embedder.
28 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_ERROR,
29
30 // Generic error (a more specific error should be used whenever possible).
31 PUSH_MESSAGING_STATUS_ERROR,
32
33 // Used for IPC message range checks.
34 PUSH_MESSAGING_STATUS_LAST = PUSH_MESSAGING_STATUS_ERROR
35 };
36
37 const char* PushMessagingStatusToString(PushMessagingStatus status);
38
39 } // namespace content
40
41 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_
OLDNEW
« no previous file with comments | « content/public/browser/push_messaging_service.h ('k') | content/public/common/push_messaging_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698