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

Side by Side Diff: Source/core/workers/WorkerGlobalScope.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
« no previous file with comments | « no previous file | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 WorkerClients* clients() { return m_workerClients.get(); } 126 WorkerClients* clients() { return m_workerClients.get(); }
127 127
128 using SecurityContext::securityOrigin; 128 using SecurityContext::securityOrigin;
129 using SecurityContext::contentSecurityPolicy; 129 using SecurityContext::contentSecurityPolicy;
130 130
131 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr ide final; 131 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr ide final;
132 ConsoleMessageStorage* messageStorage(); 132 ConsoleMessageStorage* messageStorage();
133 133
134 void exceptionHandled(int exceptionId, bool isHandled); 134 void exceptionHandled(int exceptionId, bool isHandled);
135 135
136 virtual void scriptLoaded(size_t scriptSize, size_t cachedMetadataSize) { }
137
136 DECLARE_VIRTUAL_TRACE(); 138 DECLARE_VIRTUAL_TRACE();
137 139
138 protected: 140 protected:
139 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>); 141 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>);
140 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic y, ContentSecurityPolicyHeaderType); 142 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic y, ContentSecurityPolicyHeaderType);
141 143
142 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override; 144 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override;
143 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); 145 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>);
144 void setV8CacheOptions(V8CacheOptions v8CacheOptions) { m_v8CacheOptions = v 8CacheOptions; } 146 void setV8CacheOptions(V8CacheOptions v8CacheOptions) { m_v8CacheOptions = v 8CacheOptions; }
145 147
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 191
190 unsigned long m_workerExceptionUniqueIdentifier; 192 unsigned long m_workerExceptionUniqueIdentifier;
191 WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi ngMessages; 193 WillBeHeapHashMap<unsigned long, RefPtrWillBeMember<ConsoleMessage>> m_pendi ngMessages;
192 }; 194 };
193 195
194 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 196 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
195 197
196 } // namespace blink 198 } // namespace blink
197 199
198 #endif // WorkerGlobalScope_h 200 #endif // WorkerGlobalScope_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698