Changeset 178298 in webkit
- Timestamp:
- Jan 12, 2015, 2:30:59 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
loader/FrameLoader.cpp (modified) (3 diffs)
-
page/DiagnosticLoggingKeys.cpp (modified) (1 diff)
-
page/DiagnosticLoggingKeys.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r178297 r178298 1 2015-01-12 Chris Dumez <cdumez@apple.com> 2 3 Log navigation types using DiagnosticLoggingClient 4 https://bugs.webkit.org/show_bug.cgi?id=140323 5 6 Reviewed by Darin Adler. 7 8 Log navigation types using DiagnosticLoggingClient to help us understand 9 what types of navigations are common and give us an estimate on the 10 total number of navigations. 11 12 * loader/FrameLoader.cpp: 13 (WebCore::logNavigation): 14 (WebCore::FrameLoader::loadWithDocumentLoader): 15 (WebCore::logNavigationWithFeatureCounter): Deleted. 16 * page/DiagnosticLoggingKeys.cpp: 17 (WebCore::DiagnosticLoggingKeys::navigationKey): 18 * page/DiagnosticLoggingKeys.h: 19 1 20 2015-01-12 Brian J. Burg <burg@cs.washington.edu> 2 21 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r178219 r178298 1378 1378 } 1379 1379 1380 static void logNavigationWithFeatureCounter(Page* page, FrameLoadType type) 1381 { 1382 const char* key; 1380 static void logNavigation(MainFrame& frame, FrameLoadType type) 1381 { 1382 const char* featureCounterKey; 1383 String navigationDescription; 1383 1384 switch (type) { 1384 1385 case FrameLoadType::Standard: 1385 key = FeatureCounterNavigationStandardKey; 1386 featureCounterKey = FeatureCounterNavigationStandardKey; 1387 navigationDescription = ASCIILiteral("standard"); 1386 1388 break; 1387 1389 case FrameLoadType::Back: 1388 key = FeatureCounterNavigationBackKey; 1390 featureCounterKey = FeatureCounterNavigationBackKey; 1391 navigationDescription = ASCIILiteral("back"); 1389 1392 break; 1390 1393 case FrameLoadType::Forward: 1391 key = FeatureCounterNavigationForwardKey; 1394 featureCounterKey = FeatureCounterNavigationForwardKey; 1395 navigationDescription = ASCIILiteral("forward"); 1392 1396 break; 1393 1397 case FrameLoadType::IndexedBackForward: 1394 key = FeatureCounterNavigationIndexedBackForwardKey; 1398 featureCounterKey = FeatureCounterNavigationIndexedBackForwardKey; 1399 navigationDescription = ASCIILiteral("indexedBackForward"); 1395 1400 break; 1396 1401 case FrameLoadType::Reload: 1397 key = FeatureCounterNavigationReloadKey; 1402 featureCounterKey = FeatureCounterNavigationReloadKey; 1403 navigationDescription = ASCIILiteral("reload"); 1398 1404 break; 1399 1405 case FrameLoadType::Same: 1400 key = FeatureCounterNavigationSameKey; 1406 featureCounterKey = FeatureCounterNavigationSameKey; 1407 navigationDescription = ASCIILiteral("same"); 1401 1408 break; 1402 1409 case FrameLoadType::ReloadFromOrigin: 1403 key = FeatureCounterNavigationReloadFromOriginKey; 1410 featureCounterKey = FeatureCounterNavigationReloadFromOriginKey; 1411 navigationDescription = ASCIILiteral("reloadFromOrigin"); 1404 1412 break; 1405 1413 case FrameLoadType::Replace: … … 1408 1416 return; 1409 1417 } 1410 FEATURE_COUNTER_INCREMENT_KEY(page, key); 1418 if (frame.settings().diagnosticLoggingEnabled()) { 1419 if (auto* client = frame.diagnosticLoggingClient()) 1420 client->logDiagnosticMessage(DiagnosticLoggingKeys::navigationKey(), navigationDescription); 1421 } 1422 // FIXME: Remove once DiagnosticLoggingClient works on iOS. 1423 FEATURE_COUNTER_INCREMENT_KEY(frame.page(), featureCounterKey); 1411 1424 } 1412 1425 … … 1431 1444 // Log main frame navigation types. 1432 1445 if (m_frame.isMainFrame()) 1433 logNavigation WithFeatureCounter(m_frame.page(), type);1446 logNavigation(static_cast<MainFrame&>(m_frame), type); 1434 1447 1435 1448 policyChecker().setLoadType(type); -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp
r176002 r178298 94 94 } 95 95 96 WTF::String DiagnosticLoggingKeys::navigationKey() 97 { 98 return WTF::ASCIILiteral("navigation"); 96 99 } 97 100 101 } 102 -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.h
r176002 r178298 44 44 static String pageLoadedKey(); 45 45 static String engineFailedToLoadKey(); 46 static String navigationKey(); 46 47 47 48 // Success keys.
Note:
See TracChangeset
for help on using the changeset viewer.