Skip to content

Commit

Permalink
Merge "Trace Redaction - Clean-up includes" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
vaage authored and Gerrit Code Review committed Feb 29, 2024
2 parents 0e0d53c + 7424539 commit 7a75c65
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/trace_redaction/find_package_uid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include "src/trace_redaction/find_package_uid.h"

#include "perfetto/ext/base/status_or.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/string_view.h"
#include "src/trace_redaction/trace_redaction_framework.h"

#include "protos/perfetto/trace/android/packages_list.pbzero.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"

Expand Down
3 changes: 2 additions & 1 deletion src/trace_redaction/find_package_uid.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
#define SRC_TRACE_REDACTION_FIND_PACKAGE_UID_H_

#include "perfetto/ext/base/status_or.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"
#include "src/trace_redaction/trace_redaction_framework.h"

#include "protos/perfetto/trace/trace_packet.pbzero.h"

namespace perfetto::trace_redaction {

// Writes the uid for the package matching `Context.package_name`. Returns
Expand Down
8 changes: 4 additions & 4 deletions src/trace_redaction/find_package_uid_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
* limitations under the License.
*/

#include "find_package_uid.h"
#include "src/trace_redaction/find_package_uid.h"

#include <cstdint>
#include <string>

#include "src/base/test/status_matchers.h"
#include "test/gtest_and_gmock.h"

#include "protos/perfetto/trace/android/packages_list.gen.h"
#include "protos/perfetto/trace/ps/process_tree.gen.h"
#include "protos/perfetto/trace/ps/process_tree.pbzero.h"
#include "protos/perfetto/trace/trace_packet.gen.h"
#include "src/base/test/status_matchers.h"
#include "test/gtest_and_gmock.h"

namespace perfetto::trace_redaction {

Expand Down
5 changes: 5 additions & 0 deletions src/trace_redaction/prune_package_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@

#include "src/trace_redaction/prune_package_list.h"

#include <string>

#include "perfetto/base/status.h"

#include "protos/perfetto/trace/android/packages_list.gen.h"
#include "protos/perfetto/trace/trace_packet.gen.h"

namespace perfetto::trace_redaction {

Expand Down
1 change: 1 addition & 0 deletions src/trace_redaction/prune_package_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <string>

#include "perfetto/base/status.h"
#include "src/trace_redaction/trace_redaction_framework.h"

namespace perfetto::trace_redaction {
Expand Down
6 changes: 4 additions & 2 deletions src/trace_redaction/prune_package_list_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
*/

#include <cstdint>
#include <memory>
#include <string>

#include "src/trace_redaction/prune_package_list.h"
#include "test/gtest_and_gmock.h"

#include "protos/perfetto/trace/android/packages_list.gen.h"
#include "protos/perfetto/trace/ps/process_tree.gen.h"
#include "protos/perfetto/trace/trace_packet.gen.h"
#include "src/trace_redaction/prune_package_list.h"
#include "test/gtest_and_gmock.h"

namespace perfetto::trace_redaction {

Expand Down
4 changes: 4 additions & 0 deletions src/trace_redaction/scrub_trace_packet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
* limitations under the License.
*/

#include <string>

#include "src/trace_redaction/scrub_trace_packet.h"

#include "perfetto/base/status.h"

namespace perfetto::trace_redaction {
// The TracePacket message has a simple structure. At its core its one sub
// message (e.g. ProcessTree) and some additional context (e.g. timestamp).
Expand Down
2 changes: 0 additions & 2 deletions src/trace_redaction/scrub_trace_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include "src/trace_redaction/trace_redaction_framework.h"

#include "protos/perfetto/trace/trace_packet.pbzero.h"

namespace perfetto::trace_redaction {

// Drops whole trace packets based on an allow-list (e.g. retain ProcessTree
Expand Down
1 change: 1 addition & 0 deletions src/trace_redaction/scrub_trace_packet_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "test/gtest_and_gmock.h"

#include "protos/perfetto/trace/ps/process_tree.gen.h"
#include "protos/perfetto/trace/trace_packet.gen.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"

namespace perfetto::trace_redaction {
Expand Down
3 changes: 1 addition & 2 deletions src/trace_redaction/trace_redaction_framework.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
#include <cstdint>
#include <optional>
#include <string>
#include <vector>

#include "perfetto/base/flat_set.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/status_or.h"

#include "protos/perfetto/trace/trace_packet.gen.h"
#include "protos/perfetto/trace/trace_packet.pbzero.h"

namespace perfetto::trace_redaction {
Expand Down
4 changes: 4 additions & 0 deletions src/trace_redaction/trace_redactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
#ifndef SRC_TRACE_REDACTION_TRACE_REDACTOR_H_
#define SRC_TRACE_REDACTION_TRACE_REDACTOR_H_

#include <memory>
#include <string>
#include <string_view>
#include <vector>

#include "perfetto/base/status.h"
#include "perfetto/trace_processor/trace_blob_view.h"
#include "src/trace_redaction/trace_redaction_framework.h"

Expand Down
5 changes: 5 additions & 0 deletions src/trace_redaction/trace_redactor_integrationtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
* limitations under the License.
*/

#include <memory>
#include <string>
#include <string_view>
#include <vector>

#include "perfetto/ext/base/file_utils.h"
#include "perfetto/ext/base/temp_file.h"
#include "src/base/test/utils.h"
Expand Down

0 comments on commit 7a75c65

Please sign in to comment.