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

Side by Side Diff: third_party/WebKit/Source/core/frame/HostsUsingFeatures.cpp

Issue 2585283002: Migrate WTF::Vector::append() to ::push_back() [part 6 of N] (Closed)
Patch Set: Created 3 years, 12 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/HostsUsingFeatures.h" 5 #include "core/frame/HostsUsingFeatures.h"
6 6
7 #include "bindings/core/v8/ScriptState.h" 7 #include "bindings/core/v8/ScriptState.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/LocalDOMWindow.h" 9 #include "core/frame/LocalDOMWindow.h"
10 #include "core/page/Page.h" 10 #include "core/page/Page.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void HostsUsingFeatures::documentDetached(Document& document) { 77 void HostsUsingFeatures::documentDetached(Document& document) {
78 HostsUsingFeatures::Value counter = document.HostsUsingFeaturesValue(); 78 HostsUsingFeatures::Value counter = document.HostsUsingFeaturesValue();
79 if (counter.isEmpty()) 79 if (counter.isEmpty())
80 return; 80 return;
81 81
82 const KURL& url = document.url(); 82 const KURL& url = document.url();
83 if (!url.protocolIsInHTTPFamily()) 83 if (!url.protocolIsInHTTPFamily())
84 return; 84 return;
85 85
86 m_urlAndValues.append(std::make_pair(url, counter)); 86 m_urlAndValues.push_back(std::make_pair(url, counter));
87 document.HostsUsingFeaturesValue().clear(); 87 document.HostsUsingFeaturesValue().clear();
88 DCHECK(document.HostsUsingFeaturesValue().isEmpty()); 88 DCHECK(document.HostsUsingFeaturesValue().isEmpty());
89 } 89 }
90 90
91 void HostsUsingFeatures::updateMeasurementsAndClear() { 91 void HostsUsingFeatures::updateMeasurementsAndClear() {
92 if (!m_urlAndValues.isEmpty()) { 92 if (!m_urlAndValues.isEmpty()) {
93 recordHostToRappor(); 93 recordHostToRappor();
94 recordETLDPlus1ToRappor(); 94 recordETLDPlus1ToRappor();
95 m_urlAndValues.clear(); 95 m_urlAndValues.clear();
96 } 96 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 WebURL(url)); 198 WebURL(url));
199 if (get(Feature::RTCPeerConnectionVideo)) 199 if (get(Feature::RTCPeerConnectionVideo))
200 Platform::current()->recordRapporURL("RTCPeerConnection.Video", 200 Platform::current()->recordRapporURL("RTCPeerConnection.Video",
201 WebURL(url)); 201 WebURL(url));
202 if (get(Feature::RTCPeerConnectionDataChannel)) 202 if (get(Feature::RTCPeerConnectionDataChannel))
203 Platform::current()->recordRapporURL("RTCPeerConnection.DataChannel", 203 Platform::current()->recordRapporURL("RTCPeerConnection.DataChannel",
204 WebURL(url)); 204 WebURL(url));
205 } 205 }
206 206
207 } // namespace blink 207 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698