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

Changeset 179897 in webkit


Ignore:
Timestamp:
Feb 10, 2015, 4:05:05 PM (12 years ago)
Author:
Lucas Forschler
Message:

Merged r178298. rdar://problem/19526083

Location:
branches/safari-600.5-branch/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-600.5-branch/Source/WebCore/ChangeLog

    r179884 r179897  
     12015-02-10  Lucas Forschler  <lforschler@apple.com>
     2
     3        Merge r177504 & r178298
     4
     5    2015-01-12  Chris Dumez  <cdumez@apple.com>
     6
     7            Log navigation types using DiagnosticLoggingClient
     8            https://bugs.webkit.org/show_bug.cgi?id=140323
     9
     10            Reviewed by Darin Adler.
     11
     12            Log navigation types using DiagnosticLoggingClient to help us understand
     13            what types of navigations are common and give us an estimate on the
     14            total number of navigations.
     15
     16            * loader/FrameLoader.cpp:
     17            (WebCore::logNavigation):
     18            (WebCore::FrameLoader::loadWithDocumentLoader):
     19            (WebCore::logNavigationWithFeatureCounter): Deleted.
     20            * page/DiagnosticLoggingKeys.cpp:
     21            (WebCore::DiagnosticLoggingKeys::navigationKey):
     22            * page/DiagnosticLoggingKeys.h:
     23
    1242015-02-10  Lucas Forschler  <lforschler@apple.com>
    225
  • branches/safari-600.5-branch/Source/WebCore/loader/FrameLoader.cpp

    r179521 r179897  
    14251425}
    14261426
     1427static void logNavigation(MainFrame& frame, FrameLoadType type)
     1428{
     1429    String navigationDescription;
     1430    switch (type) {
     1431    case FrameLoadType::Standard:
     1432        navigationDescription = ASCIILiteral("standard");
     1433        break;
     1434    case FrameLoadType::Back:
     1435        navigationDescription = ASCIILiteral("back");
     1436        break;
     1437    case FrameLoadType::Forward:
     1438        navigationDescription = ASCIILiteral("forward");
     1439        break;
     1440    case FrameLoadType::IndexedBackForward:
     1441        navigationDescription = ASCIILiteral("indexedBackForward");
     1442        break;
     1443    case FrameLoadType::Reload:
     1444        navigationDescription = ASCIILiteral("reload");
     1445        break;
     1446    case FrameLoadType::Same:
     1447        navigationDescription = ASCIILiteral("same");
     1448        break;
     1449    case FrameLoadType::ReloadFromOrigin:
     1450        navigationDescription = ASCIILiteral("reloadFromOrigin");
     1451        break;
     1452    case FrameLoadType::Replace:
     1453    case FrameLoadType::RedirectWithLockedBackForwardList:
     1454        // Not logging those for now.
     1455        return;
     1456    }
     1457
     1458    if (frame.settings().diagnosticLoggingEnabled()) {
     1459        if (auto* client = frame.diagnosticLoggingClient())
     1460            client->logDiagnosticMessage(DiagnosticLoggingKeys::navigationKey(), navigationDescription);
     1461    }
     1462}
     1463
     1464
    14271465void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType type, PassRefPtr<FormState> prpFormState, AllowNavigationToInvalidURL allowNavigationToInvalidURL)
    14281466{
     
    14421480    if (m_frame.document())
    14431481        m_previousURL = m_frame.document()->url();
     1482
     1483    // Log main frame navigation types.
     1484    if (m_frame.isMainFrame())
     1485        logNavigation(static_cast<MainFrame&>(m_frame), type);
    14441486
    14451487    policyChecker().setLoadType(type);
  • branches/safari-600.5-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp

    r175660 r179897  
    8989}
    9090
     91WTF::String DiagnosticLoggingKeys::navigationKey()
     92{
     93    return WTF::ASCIILiteral("navigation");
    9194}
     95
     96}
  • branches/safari-600.5-branch/Source/WebCore/page/DiagnosticLoggingKeys.h

    r175660 r179897  
    4343    static String pageContainsAtLeastOneMediaEngineKey();
    4444    static String pageLoadedKey();
     45    static String navigationKey();
    4546
    4647    // Success keys.
Note: See TracChangeset for help on using the changeset viewer.