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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.h

Issue 1059193002: Add UMA to understand the typical total size of ServiceWorker script [1/2 blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: check Platform::current() Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
index d27d9893820a4a0f82de5a554737d8d85c7bea7a..6928430576bfb59e191b4cfc826bcfbbab32b33a 100644
--- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
+++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
@@ -97,9 +97,10 @@ private:
class SkipWaitingCallback;
ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorkerThread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>);
- virtual void importScripts(const Vector<String>& urls, ExceptionState&) override;
- virtual PassOwnPtr<CachedMetadataHandler> createWorkerScriptCachedMetadataHandler(const KURL& scriptURL, const Vector<char>* metaData);
- virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>) override;
+ void importScripts(const Vector<String>& urls, ExceptionState&) override;
+ PassOwnPtr<CachedMetadataHandler> createWorkerScriptCachedMetadataHandler(const KURL& scriptURL, const Vector<char>* metaData) override;
+ void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>) override;
+ void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override;
PersistentWillBeMember<ServiceWorkerClients> m_clients;
PersistentWillBeMember<ServiceWorkerRegistration> m_registration;
@@ -107,6 +108,9 @@ private:
bool m_didEvaluateScript;
bool m_hadErrorInTopLevelEventHandler;
unsigned m_eventNestingLevel;
+ size_t m_scriptCount;
+ size_t m_scriptTotalSize;
+ size_t m_scriptCachedMetadataTotalSize;
};
} // namespace blink
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698