| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/service_worker/service_worker_version.h" | 5 #include "content/browser/service_worker/service_worker_version.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "content/browser/service_worker/embedded_worker_instance.h" | 9 #include "content/browser/service_worker/embedded_worker_instance.h" |
| 10 #include "content/browser/service_worker/embedded_worker_registry.h" | 10 #include "content/browser/service_worker/embedded_worker_registry.h" |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 script_cache_map_[url] = resource_id; | 554 script_cache_map_[url] = resource_id; |
| 555 } | 555 } |
| 556 | 556 |
| 557 int64 ServiceWorkerVersion::LookupInScriptCache(const GURL& url) { | 557 int64 ServiceWorkerVersion::LookupInScriptCache(const GURL& url) { |
| 558 ResourceIDMap::const_iterator found = script_cache_map_.find(url); | 558 ResourceIDMap::const_iterator found = script_cache_map_.find(url); |
| 559 if (found == script_cache_map_.end()) | 559 if (found == script_cache_map_.end()) |
| 560 return kInvalidServiceWorkerResponseId; | 560 return kInvalidServiceWorkerResponseId; |
| 561 return found->second; | 561 return found->second; |
| 562 } | 562 } |
| 563 | 563 |
| 564 void ServiceWorkerVersion::NotifyMainScriptCacheResult(bool success) { |
| 565 FOR_EACH_OBSERVER(Listener, listeners_, |
| 566 OnMainScriptCacheResult(this, success)); |
| 567 } |
| 568 |
| 564 } // namespace content | 569 } // namespace content |
| OLD | NEW |