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

Side by Side 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, 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch); 90 DEFINE_ATTRIBUTE_EVENT_LISTENER(fetch);
91 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 91 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
92 DEFINE_ATTRIBUTE_EVENT_LISTENER(sync); 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(sync);
93 93
94 DECLARE_VIRTUAL_TRACE(); 94 DECLARE_VIRTUAL_TRACE();
95 95
96 private: 96 private:
97 class SkipWaitingCallback; 97 class SkipWaitingCallback;
98 98
99 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker Thread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<Worker Clients>); 99 ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorker Thread*, double timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<Worker Clients>);
100 virtual void importScripts(const Vector<String>& urls, ExceptionState&) over ride; 100 void importScripts(const Vector<String>& urls, ExceptionState&) override;
101 virtual PassOwnPtr<CachedMetadataHandler> createWorkerScriptCachedMetadataHa ndler(const KURL& scriptURL, const Vector<char>* metaData); 101 PassOwnPtr<CachedMetadataHandler> createWorkerScriptCachedMetadataHandler(co nst KURL& scriptURL, const Vector<char>* metaData) override;
102 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override; 102 void logExceptionToConsole(const String& errorMessage, int scriptId, const S tring& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<Scrip tCallStack>) override;
103 void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) override;
103 104
104 PersistentWillBeMember<ServiceWorkerClients> m_clients; 105 PersistentWillBeMember<ServiceWorkerClients> m_clients;
105 PersistentWillBeMember<ServiceWorkerRegistration> m_registration; 106 PersistentWillBeMember<ServiceWorkerRegistration> m_registration;
106 PersistentWillBeMember<CacheStorage> m_caches; 107 PersistentWillBeMember<CacheStorage> m_caches;
107 bool m_didEvaluateScript; 108 bool m_didEvaluateScript;
108 bool m_hadErrorInTopLevelEventHandler; 109 bool m_hadErrorInTopLevelEventHandler;
109 unsigned m_eventNestingLevel; 110 unsigned m_eventNestingLevel;
111 size_t m_scriptCount;
112 size_t m_scriptTotalSize;
113 size_t m_scriptCachedMetadataTotalSize;
110 }; 114 };
111 115
112 } // namespace blink 116 } // namespace blink
113 117
114 #endif // ServiceWorkerGlobalScope_h 118 #endif // ServiceWorkerGlobalScope_h
OLDNEW
« 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