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

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

Issue 1044203004: [Storage] Cache storage inspection on all the frames! (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: comments and rebase Created 5 years, 8 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String & userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) 93 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String & userAgent, ServiceWorkerThread* thread, double timeOrigin, const SecurityOrigi n* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients)
94 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke rClients) 94 : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOrigin, worke rClients)
95 , m_didEvaluateScript(false) 95 , m_didEvaluateScript(false)
96 , m_hadErrorInTopLevelEventHandler(false) 96 , m_hadErrorInTopLevelEventHandler(false)
97 , m_eventNestingLevel(0) 97 , m_eventNestingLevel(0)
98 , m_scriptCount(0) 98 , m_scriptCount(0)
99 , m_scriptTotalSize(0) 99 , m_scriptTotalSize(0)
100 , m_scriptCachedMetadataTotalSize(0) 100 , m_scriptCachedMetadataTotalSize(0)
101 { 101 {
102 workerInspectorController()->registerModuleAgent(InspectorCacheStorageAgent: :create(this));
103 } 102 }
104 103
105 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() 104 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope()
106 { 105 {
107 } 106 }
108 107
109 void ServiceWorkerGlobalScope::didEvaluateWorkerScript() 108 void ServiceWorkerGlobalScope::didEvaluateWorkerScript()
110 { 109 {
111 if (Platform* platform = Platform::current()) { 110 if (Platform* platform = Platform::current()) {
112 platform->histogramCustomCounts("ServiceWorker.ScriptCount", m_scriptCou nt, 1, 1000, 50); 111 platform->histogramCustomCounts("ServiceWorker.ScriptCount", m_scriptCou nt, 1, 1000, 50);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 234 }
236 235
237 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta dataSize) 236 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta dataSize)
238 { 237 {
239 ++m_scriptCount; 238 ++m_scriptCount;
240 m_scriptTotalSize += scriptSize; 239 m_scriptTotalSize += scriptSize;
241 m_scriptCachedMetadataTotalSize += cachedMetadataSize; 240 m_scriptCachedMetadataTotalSize += cachedMetadataSize;
242 } 241 }
243 242
244 } // namespace blink 243 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698