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

Side by Side Diff: content/common/service_worker/service_worker_status_code.cc

Issue 142973003: Have a central operation status code for ServiceWorker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « content/common/service_worker/service_worker_status_code.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/common/service_worker/service_worker_status_code.h"
6
7 #include "base/logging.h"
8
9 namespace content {
10
11 const char* ServiceWorkerStatusToString(ServiceWorkerStatusCode status) {
12 switch (status) {
13 case SERVICE_WORKER_OK:
14 return "Operation has succeeded";
15 case SERVICE_WORKER_ERROR_FAILED:
16 return "Operation has failed (unknown reason)";
17 case SERVICE_WORKER_ERROR_ABORT:
18 return "Operation has been aborted";
19 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND:
20 return "Could not find a renderer process to run a service worker";
21 case SERVICE_WORKER_ERROR_START_WORKER_FAILED:
22 return "ServiceWorker cannot be started";
23 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED:
24 return "ServiceWorker failed to install";
25 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED:
26 return "ServiceWorker failed to activate";
27 }
28 NOTREACHED();
29 return "";
30 }
31
32 } // namespace content
OLDNEW
« no previous file with comments | « content/common/service_worker/service_worker_status_code.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698