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

Side by Side Diff: third_party/WebKit/Source/core/frame/UseCounter.h

Issue 2393313002: reflow comments in core/frame (Closed)
Patch Set: tweak Created 4 years, 2 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) 2012 Google, Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 DocumentCreateTouchTargetNull = 1609, 1334 DocumentCreateTouchTargetNull = 1609,
1335 DocumentCreateTouchTargetWrongType = 1610, 1335 DocumentCreateTouchTargetWrongType = 1610,
1336 DocumentCreateTouchLessThanSevenArguments = 1611, 1336 DocumentCreateTouchLessThanSevenArguments = 1611,
1337 DocumentCreateTouchMoreThanSevenArguments = 1612, 1337 DocumentCreateTouchMoreThanSevenArguments = 1612,
1338 EncryptedMediaCapabilityProvided = 1613, 1338 EncryptedMediaCapabilityProvided = 1613,
1339 EncryptedMediaCapabilityNotProvided = 1614, 1339 EncryptedMediaCapabilityNotProvided = 1614,
1340 LongTaskObserver = 1615, 1340 LongTaskObserver = 1615,
1341 1341
1342 // Add new features immediately above this line. Don't change assigned 1342 // Add new features immediately above this line. Don't change assigned
1343 // numbers of any item, and don't reuse removed slots. 1343 // numbers of any item, and don't reuse removed slots.
1344 // Also, run update_use_counter_feature_enum.py in chromium/src/tools/metric s/histograms/ 1344 // Also, run update_use_counter_feature_enum.py in
1345 // to update the UMA mapping. 1345 // chromium/src/tools/metrics/histograms/ to update the UMA mapping.
1346 NumberOfFeatures, // This enum value must be last. 1346 NumberOfFeatures, // This enum value must be last.
1347 }; 1347 };
1348 1348
1349 // "count" sets the bit for this feature to 1. Repeated calls are ignored. 1349 // "count" sets the bit for this feature to 1. Repeated calls are ignored.
1350 static void count(const Frame*, Feature); 1350 static void count(const Frame*, Feature);
1351 static void count(const Document&, Feature); 1351 static void count(const Document&, Feature);
1352 // This doesn't count for ExecutionContexts for shared workers and service 1352 // This doesn't count for ExecutionContexts for shared workers and service
1353 // workers. 1353 // workers.
1354 static void count(const ExecutionContext*, Feature); 1354 static void count(const ExecutionContext*, Feature);
1355 // Use countIfNotPrivateScript() instead of count() if you don't want 1355 // Use countIfNotPrivateScript() instead of count() if you don't want
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 1392
1393 bool hasRecordedMeasurement(Feature) const; 1393 bool hasRecordedMeasurement(Feature) const;
1394 1394
1395 private: 1395 private:
1396 EnumerationHistogram& featuresHistogram() const; 1396 EnumerationHistogram& featuresHistogram() const;
1397 EnumerationHistogram& cssHistogram() const; 1397 EnumerationHistogram& cssHistogram() const;
1398 1398
1399 unsigned m_muteCount; 1399 unsigned m_muteCount;
1400 Context m_context; 1400 Context m_context;
1401 1401
1402 // Track what features/properties have been reported to the (non-legacy) histo grams. 1402 // Track what features/properties have been reported to the (non-legacy)
1403 // histograms.
1403 BitVector m_featuresRecorded; 1404 BitVector m_featuresRecorded;
1404 BitVector m_CSSRecorded; 1405 BitVector m_CSSRecorded;
1405 1406
1406 // Encapsulates the work to preserve the old "FeatureObserver" histogram with original semantics 1407 // Encapsulates the work to preserve the old "FeatureObserver" histogram with
1408 // original semantics
1407 // TODO(rbyers): remove this - http://crbug.com/597963 1409 // TODO(rbyers): remove this - http://crbug.com/597963
1408 class CORE_EXPORT LegacyCounter { 1410 class CORE_EXPORT LegacyCounter {
1409 public: 1411 public:
1410 LegacyCounter(); 1412 LegacyCounter();
1411 ~LegacyCounter(); 1413 ~LegacyCounter();
1412 void countFeature(Feature); 1414 void countFeature(Feature);
1413 void countCSS(CSSPropertyID); 1415 void countCSS(CSSPropertyID);
1414 void updateMeasurements(); 1416 void updateMeasurements();
1415 1417
1416 private: 1418 private:
1417 // Tracks what features/properties need to be reported to the legacy histogr ams. 1419 // Tracks what features/properties need to be reported to the legacy
1420 // histograms.
1418 BitVector m_featureBits; 1421 BitVector m_featureBits;
1419 BitVector m_CSSBits; 1422 BitVector m_CSSBits;
1420 } m_legacyCounter; 1423 } m_legacyCounter;
1421 }; 1424 };
1422 1425
1423 } // namespace blink 1426 } // namespace blink
1424 1427
1425 #endif // UseCounter_h 1428 #endif // UseCounter_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/TopControls.h ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698