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

Side by Side Diff: base/tracked_objects.h

Issue 7215034: Apply CSP to chrome: and about: pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/tracked_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_TRACKED_OBJECTS_H_ 5 #ifndef BASE_TRACKED_OBJECTS_H_
6 #define BASE_TRACKED_OBJECTS_H_ 6 #define BASE_TRACKED_OBJECTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 bool IsGroupedBy(Selector selector) const; 417 bool IsGroupedBy(Selector selector) const;
418 418
419 // Using the tiebreakers as set above, we mostly get an ordering, which 419 // Using the tiebreakers as set above, we mostly get an ordering, which
420 // equivalent groups. If those groups are displayed (rather than just being 420 // equivalent groups. If those groups are displayed (rather than just being
421 // aggregated, then the following is used to order them (within the group). 421 // aggregated, then the following is used to order them (within the group).
422 void SetSubgroupTiebreaker(Selector selector); 422 void SetSubgroupTiebreaker(Selector selector);
423 423
424 // Translate a keyword and restriction in URL path to a selector for sorting. 424 // Translate a keyword and restriction in URL path to a selector for sorting.
425 void ParseKeyphrase(const std::string& key_phrase); 425 void ParseKeyphrase(const std::string& key_phrase);
426 426
427 // Parse a query in an about:tasks URL to decide on sort ordering. 427 // Parse a query to decide on sort ordering.
428 bool ParseQuery(const std::string& query); 428 bool ParseQuery(const std::string& query);
429 429
430 // Output a header line that can be used to indicated what items will be 430 // Output a header line that can be used to indicated what items will be
431 // collected in the group. It lists all (potentially) tested attributes and 431 // collected in the group. It lists all (potentially) tested attributes and
432 // their values (in the sample item). 432 // their values (in the sample item).
433 bool WriteSortGrouping(const Snapshot& sample, std::string* output) const; 433 bool WriteSortGrouping(const Snapshot& sample, std::string* output) const;
434 434
435 // Output a sample, with SortGroup details not displayed. 435 // Output a sample, with SortGroup details not displayed.
436 void WriteSnapshot(const Snapshot& sample, std::string* output) const; 436 void WriteSnapshot(const Snapshot& sample, std::string* output) const;
437 437
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 ThreadData(); 473 ThreadData();
474 ~ThreadData(); 474 ~ThreadData();
475 475
476 // Using Thread Local Store, find the current instance for collecting data. 476 // Using Thread Local Store, find the current instance for collecting data.
477 // If an instance does not exist, construct one (and remember it for use on 477 // If an instance does not exist, construct one (and remember it for use on
478 // this thread. 478 // this thread.
479 // If shutdown has already started, and we don't yet have an instance, then 479 // If shutdown has already started, and we don't yet have an instance, then
480 // return null. 480 // return null.
481 static ThreadData* current(); 481 static ThreadData* current();
482 482
483 // For a given about:tasks URL, develop resulting HTML, and append to output. 483 // For a given (unescaped) about:tasks query, develop resulting HTML, and
484 // append to output.
484 static void WriteHTML(const std::string& query, std::string* output); 485 static void WriteHTML(const std::string& query, std::string* output);
485 486
486 // For a given accumulated array of results, use the comparator to sort and 487 // For a given accumulated array of results, use the comparator to sort and
487 // subtotal, writing the results to the output. 488 // subtotal, writing the results to the output.
488 static void WriteHTMLTotalAndSubtotals( 489 static void WriteHTMLTotalAndSubtotals(
489 const DataCollector::Collection& match_array, 490 const DataCollector::Collection& match_array,
490 const Comparator& comparator, std::string* output); 491 const Comparator& comparator, std::string* output);
491 492
492 // In this thread's data, record a new birth. 493 // In this thread's data, record a new birth.
493 Births* TallyABirth(const Location& location); 494 Births* TallyABirth(const Location& location);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 }; 659 };
659 static State state_; 660 static State state_;
660 661
661 DISALLOW_COPY_AND_ASSIGN(AutoTracking); 662 DISALLOW_COPY_AND_ASSIGN(AutoTracking);
662 }; 663 };
663 664
664 665
665 } // namespace tracked_objects 666 } // namespace tracked_objects
666 667
667 #endif // BASE_TRACKED_OBJECTS_H_ 668 #endif // BASE_TRACKED_OBJECTS_H_
OLDNEW
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/tracked_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698