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: content/child/site_isolation_stats_gatherer.cc

Issue 2303653005: Migrate content/ files to histogram_macros.h includes. (Closed)
Patch Set: Created 4 years, 3 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 "content/child/site_isolation_stats_gatherer.h" 5 #include "content/child/site_isolation_stats_gatherer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "content/public/common/resource_response_info.h" 14 #include "content/public/common/resource_response_info.h"
15 #include "net/http/http_response_headers.h" 15 #include "net/http/http_response_headers.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 namespace { 19 namespace {
20 20
21 // The gathering of UMA stats for site isolation is deactivated by default, and 21 // The gathering of UMA stats for site isolation is deactivated by default, and
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 253
254 bool SiteIsolationStatsGatherer::SniffForJS(base::StringPiece data) { 254 bool SiteIsolationStatsGatherer::SniffForJS(base::StringPiece data) {
255 // The purpose of this function is to try to see if there's any possibility 255 // The purpose of this function is to try to see if there's any possibility
256 // that this data can be JavaScript (superset of JS). Search for "var " for JS 256 // that this data can be JavaScript (superset of JS). Search for "var " for JS
257 // detection. This is a real hack and should only be used for stats gathering. 257 // detection. This is a real hack and should only be used for stats gathering.
258 return data.find("var ") != base::StringPiece::npos; 258 return data.find("var ") != base::StringPiece::npos;
259 } 259 }
260 260
261 } // namespace content 261 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/zygote_host/zygote_communication_linux.cc ('k') | content/common/child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698