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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceNavigation.cpp

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 namespace blink { 37 namespace blink {
38 38
39 PerformanceNavigation::PerformanceNavigation(LocalFrame* frame) 39 PerformanceNavigation::PerformanceNavigation(LocalFrame* frame)
40 : DOMWindowProperty(frame) 40 : DOMWindowProperty(frame)
41 { 41 {
42 } 42 }
43 43
44 unsigned short PerformanceNavigation::type() const 44 unsigned short PerformanceNavigation::type() const
45 { 45 {
46 if (!m_frame) 46 if (!m_frame)
47 return TYPE_NAVIGATE; 47 return kTypeNavigate;
48 48
49 DocumentLoader* documentLoader = m_frame->loader().documentLoader(); 49 DocumentLoader* documentLoader = m_frame->loader().documentLoader();
50 if (!documentLoader) 50 if (!documentLoader)
51 return TYPE_NAVIGATE; 51 return kTypeNavigate;
52 52
53 switch (documentLoader->getNavigationType()) { 53 switch (documentLoader->getNavigationType()) {
54 case NavigationTypeReload: 54 case NavigationTypeReload:
55 return TYPE_RELOAD; 55 return kTypeReload;
56 case NavigationTypeBackForward: 56 case NavigationTypeBackForward:
57 return TYPE_BACK_FORWARD; 57 return kTypeBackForward;
58 default: 58 default:
59 return TYPE_NAVIGATE; 59 return kTypeNavigate;
60 } 60 }
61 } 61 }
62 62
63 unsigned short PerformanceNavigation::redirectCount() const 63 unsigned short PerformanceNavigation::redirectCount() const
64 { 64 {
65 if (!m_frame) 65 if (!m_frame)
66 return 0; 66 return 0;
67 67
68 DocumentLoader* loader = m_frame->loader().documentLoader(); 68 DocumentLoader* loader = m_frame->loader().documentLoader();
69 if (!loader) 69 if (!loader)
70 return 0; 70 return 0;
71 71
72 const DocumentLoadTiming& timing = loader->timing(); 72 const DocumentLoadTiming& timing = loader->timing();
73 if (timing.hasCrossOriginRedirect()) 73 if (timing.hasCrossOriginRedirect())
74 return 0; 74 return 0;
75 75
76 return timing.redirectCount(); 76 return timing.redirectCount();
77 } 77 }
78 78
79 DEFINE_TRACE(PerformanceNavigation) 79 DEFINE_TRACE(PerformanceNavigation)
80 { 80 {
81 DOMWindowProperty::trace(visitor); 81 DOMWindowProperty::trace(visitor);
82 } 82 }
83 83
84 } // namespace blink 84 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceNavigation.h ('k') | third_party/WebKit/Source/core/xml/DocumentXSLT.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698