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

Side by Side Diff: third_party/WebKit/Source/web/WebPageImportanceSignals.cpp

Issue 2913653002: Move more standalone files from web/ to core/exported/. (Closed)
Patch Set: Move files to the right directory. Created 3 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "public/web/WebPageImportanceSignals.h"
6
7 #include "platform/Histogram.h"
8 #include "public/web/WebViewClient.h"
9
10 namespace blink {
11
12 void WebPageImportanceSignals::Reset() {
13 had_form_interaction_ = false;
14 issued_non_get_fetch_from_script_ = false;
15 if (observer_)
16 observer_->PageImportanceSignalsChanged();
17 }
18
19 void WebPageImportanceSignals::SetHadFormInteraction() {
20 had_form_interaction_ = true;
21 if (observer_)
22 observer_->PageImportanceSignalsChanged();
23 }
24
25 void WebPageImportanceSignals::SetIssuedNonGetFetchFromScript() {
26 issued_non_get_fetch_from_script_ = true;
27 if (observer_)
28 observer_->PageImportanceSignalsChanged();
29 }
30
31 void WebPageImportanceSignals::OnCommitLoad() {
32 DEFINE_STATIC_LOCAL(
33 EnumerationHistogram, had_form_interaction_histogram,
34 ("PageImportanceSignals.HadFormInteraction.OnCommitLoad", 2));
35 had_form_interaction_histogram.Count(had_form_interaction_);
36
37 DEFINE_STATIC_LOCAL(
38 EnumerationHistogram, issued_non_get_histogram,
39 ("PageImportanceSignals.IssuedNonGetFetchFromScript.OnCommitLoad", 2));
40 issued_non_get_histogram.Count(issued_non_get_fetch_from_script_);
41
42 Reset();
43 }
44
45 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | third_party/WebKit/Source/web/WebPluginScriptForbiddenScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698