⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 178298 in webkit


Ignore:
Timestamp:
Jan 12, 2015, 2:30:59 PM (12 years ago)
Author:
Chris Dumez
Message:

Log navigation types using DiagnosticLoggingClient
https://bugs.webkit.org/show_bug.cgi?id=140323

Reviewed by Darin Adler.

Log navigation types using DiagnosticLoggingClient to help us understand
what types of navigations are common and give us an estimate on the
total number of navigations.

  • loader/FrameLoader.cpp:

(WebCore::logNavigation):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::logNavigationWithFeatureCounter): Deleted.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::navigationKey):

  • page/DiagnosticLoggingKeys.h:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r178297 r178298  
     12015-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
    1202015-01-12  Brian J. Burg  <burg@cs.washington.edu>
    221
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r178219 r178298  
    13781378}
    13791379
    1380 static void logNavigationWithFeatureCounter(Page* page, FrameLoadType type)
    1381 {
    1382     const char* key;
     1380static void logNavigation(MainFrame& frame, FrameLoadType type)
     1381{
     1382    const char* featureCounterKey;
     1383    String navigationDescription;
    13831384    switch (type) {
    13841385    case FrameLoadType::Standard:
    1385         key = FeatureCounterNavigationStandardKey;
     1386        featureCounterKey = FeatureCounterNavigationStandardKey;
     1387        navigationDescription = ASCIILiteral("standard");
    13861388        break;
    13871389    case FrameLoadType::Back:
    1388         key = FeatureCounterNavigationBackKey;
     1390        featureCounterKey = FeatureCounterNavigationBackKey;
     1391        navigationDescription = ASCIILiteral("back");
    13891392        break;
    13901393    case FrameLoadType::Forward:
    1391         key = FeatureCounterNavigationForwardKey;
     1394        featureCounterKey = FeatureCounterNavigationForwardKey;
     1395        navigationDescription = ASCIILiteral("forward");
    13921396        break;
    13931397    case FrameLoadType::IndexedBackForward:
    1394         key = FeatureCounterNavigationIndexedBackForwardKey;
     1398        featureCounterKey = FeatureCounterNavigationIndexedBackForwardKey;
     1399        navigationDescription = ASCIILiteral("indexedBackForward");
    13951400        break;
    13961401    case FrameLoadType::Reload:
    1397         key = FeatureCounterNavigationReloadKey;
     1402        featureCounterKey = FeatureCounterNavigationReloadKey;
     1403        navigationDescription = ASCIILiteral("reload");
    13981404        break;
    13991405    case FrameLoadType::Same:
    1400         key = FeatureCounterNavigationSameKey;
     1406        featureCounterKey = FeatureCounterNavigationSameKey;
     1407        navigationDescription = ASCIILiteral("same");
    14011408        break;
    14021409    case FrameLoadType::ReloadFromOrigin:
    1403         key = FeatureCounterNavigationReloadFromOriginKey;
     1410        featureCounterKey = FeatureCounterNavigationReloadFromOriginKey;
     1411        navigationDescription = ASCIILiteral("reloadFromOrigin");
    14041412        break;
    14051413    case FrameLoadType::Replace:
     
    14081416        return;
    14091417    }
    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);
    14111424}
    14121425
     
    14311444    // Log main frame navigation types.
    14321445    if (m_frame.isMainFrame())
    1433         logNavigationWithFeatureCounter(m_frame.page(), type);
     1446        logNavigation(static_cast<MainFrame&>(m_frame), type);
    14341447
    14351448    policyChecker().setLoadType(type);
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp

    r176002 r178298  
    9494}
    9595
     96WTF::String DiagnosticLoggingKeys::navigationKey()
     97{
     98    return WTF::ASCIILiteral("navigation");
    9699}
    97100
     101}
     102
  • trunk/Source/WebCore/page/DiagnosticLoggingKeys.h

    r176002 r178298  
    4444    static String pageLoadedKey();
    4545    static String engineFailedToLoadKey();
     46    static String navigationKey();
    4647
    4748    // Success keys.
Note: See TracChangeset for help on using the changeset viewer.