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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorker.cpp

Issue 1216093003: Service Worker: Migrate to version_uuid and surface ServiceWorker.id. (Blink 1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 case WebServiceWorkerStateActivated: 94 case WebServiceWorkerStateActivated:
95 return "activated"; 95 return "activated";
96 case WebServiceWorkerStateRedundant: 96 case WebServiceWorkerStateRedundant:
97 return "redundant"; 97 return "redundant";
98 default: 98 default:
99 ASSERT_NOT_REACHED(); 99 ASSERT_NOT_REACHED();
100 return nullAtom; 100 return nullAtom;
101 } 101 }
102 } 102 }
103 103
104 String ServiceWorker::id() const
105 {
106 return m_outerWorker->id();
107 }
108
104 PassRefPtrWillBeRawPtr<ServiceWorker> ServiceWorker::from(ExecutionContext* exec utionContext, WebType* worker) 109 PassRefPtrWillBeRawPtr<ServiceWorker> ServiceWorker::from(ExecutionContext* exec utionContext, WebType* worker)
105 { 110 {
106 if (!worker) 111 if (!worker)
107 return nullptr; 112 return nullptr;
108 113
109 RefPtrWillBeRawPtr<ServiceWorker> serviceWorker = getOrCreate(executionConte xt, worker); 114 RefPtrWillBeRawPtr<ServiceWorker> serviceWorker = getOrCreate(executionConte xt, worker);
110 return serviceWorker.release(); 115 return serviceWorker.release();
111 } 116 }
112 117
113 bool ServiceWorker::hasPendingActivity() const 118 bool ServiceWorker::hasPendingActivity() const
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 152 {
148 ASSERT(m_outerWorker); 153 ASSERT(m_outerWorker);
149 m_outerWorker->setProxy(this); 154 m_outerWorker->setProxy(this);
150 } 155 }
151 156
152 ServiceWorker::~ServiceWorker() 157 ServiceWorker::~ServiceWorker()
153 { 158 {
154 } 159 }
155 160
156 } // namespace blink 161 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorker.h ('k') | Source/modules/serviceworkers/ServiceWorker.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698