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

Unified Diff: third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp

Issue 2706643002: DevTools: Move network request instrumentation points for timeline down the stack. (Closed)
Patch Set: addressing comment Created 3 years, 10 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
Index: third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
diff --git a/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp b/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
index 4ade71c32b6a51501765b9c4dc4f732300d27c9d..31c13166844e1db565e9ab2603fb64e42fb4761e 100644
--- a/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
+++ b/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
@@ -35,23 +35,6 @@
namespace blink {
-namespace {
-
-volatile int s_lastUsedIdentifier = 0;
-
-} // namespace
-
-// static
-String IdentifiersFactory::createIdentifier() {
- int identifier = atomicIncrement(&s_lastUsedIdentifier);
- return addProcessIdPrefixTo(identifier);
-}
-
-// static
-String IdentifiersFactory::requestId(unsigned long identifier) {
- return identifier ? addProcessIdPrefixTo(identifier) : String();
-}
-
// static
String IdentifiersFactory::frameId(LocalFrame* frame) {
return addProcessIdPrefixTo(WeakIdentifierMap<LocalFrame>::identifier(frame));
@@ -86,30 +69,4 @@ DocumentLoader* IdentifiersFactory::loaderById(InspectedFrames* inspectedFrames,
return frame && inspectedFrames->contains(frame) ? loader : nullptr;
}
-// static
-String IdentifiersFactory::addProcessIdPrefixTo(int id) {
- DEFINE_THREAD_SAFE_STATIC_LOCAL(
- uint32_t, s_processId,
- new uint32_t(Platform::current()->getUniqueIdForProcess()));
-
- StringBuilder builder;
-
- builder.appendNumber(s_processId);
- builder.append('.');
- builder.appendNumber(id);
-
- return builder.toString();
-}
-
-// static
-int IdentifiersFactory::removeProcessIdPrefixFrom(const String& id, bool* ok) {
- size_t dotIndex = id.find('.');
-
- if (dotIndex == kNotFound) {
- *ok = false;
- return 0;
- }
- return id.substring(dotIndex + 1).toInt(ok);
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698