[memory] Replace bool success with MemoryDumpRequestOutcome enum. [chromium/src : main]

22 views
Skip to first unread message

Francois Pierre Doray (Gerrit)

unread,
Oct 12, 2025, 8:00:54 PMOct 12
to Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Joe Mason

Francois Pierre Doray added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Francois Pierre Doray . resolved

Please take a look. Thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Joe Mason
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
Gerrit-Change-Number: 7029767
Gerrit-PatchSet: 6
Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
Gerrit-Reviewer: Joe Mason <joenot...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Zijie He <zij...@google.com>
Gerrit-Attention: Joe Mason <joenot...@google.com>
Gerrit-Comment-Date: Mon, 13 Oct 2025 00:00:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Francois Pierre Doray (Gerrit)

unread,
Oct 12, 2025, 8:55:43 PMOct 12
to Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Joe Mason

Francois Pierre Doray voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Joe Mason
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
Gerrit-Change-Number: 7029767
Gerrit-PatchSet: 8
Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
Gerrit-Reviewer: Joe Mason <joenot...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Zijie He <zij...@google.com>
Gerrit-Attention: Joe Mason <joenot...@google.com>
Gerrit-Comment-Date: Mon, 13 Oct 2025 00:55:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Joe Mason (Gerrit)

unread,
Oct 14, 2025, 5:59:46 PMOct 14
to Francois Pierre Doray, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
Attention needed from Francois Pierre Doray

Joe Mason added 5 comments

File base/trace_event/memory_dump_manager_unittest.cc
Line 211, Patchset 8 (Latest): std::optional<ProcessMemoryDumpOutcome> captured_outcome;
Joe Mason . unresolved

Optional nit: while you're changing this, it could use TestFuture:

```
TestFuture<ProcessMemoryDumpOutcome, uint64_t,
std::unique_ptr<ProcessMemoryDump>> future;
mdb->CreateProcessDump(request_args, future.GetSequenceBoundCallback());
ASSERT_TRUE(future.Wait());
EXPECT_EQ(future.Get<uint64_t>(), test_guid);
return future.Get<ProcessMemoryDumpOutcome>();
```
File chrome/browser/autocomplete/autocomplete_browsertest.cc
Line 385, Patchset 8 (Latest): run_loop.QuitClosure()));
Joe Mason . unresolved

Optional nit: this could be simplified with TestFuture.

File services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
Line 721, Patchset 8 (Latest): EXPECT_EQ(outcome, mojom::MemoryDumpRequestOutcome::kSuccess);
Joe Mason . unresolved

Nit: this isn't needed because EXPECT_CALL already matches only `outcome == kSuccess`.

File services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
Line 520, Patchset 8 (Latest): ;
Joe Mason . unresolved

Nit: extra ;

File services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
Line 201, Patchset 8 (Latest): return captured_outcome.value();
Joe Mason . unresolved

Optional nit: this could be simplified further with TestFuture.

Open in Gerrit

Related details

Attention is currently required from:
  • Francois Pierre Doray
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
    Gerrit-Change-Number: 7029767
    Gerrit-PatchSet: 8
    Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
    Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
    Gerrit-Reviewer: Joe Mason <joenot...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Zijie He <zij...@google.com>
    Gerrit-Attention: Francois Pierre Doray <fdo...@chromium.org>
    Gerrit-Comment-Date: Tue, 14 Oct 2025 21:59:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joe Mason (Gerrit)

    unread,
    Oct 14, 2025, 6:01:15 PMOct 14
    to Francois Pierre Doray, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
    Attention needed from Francois Pierre Doray

    Joe Mason voted and added 2 comments

    Votes added by Joe Mason

    Code-Review+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 8 (Latest):
    Joe Mason . resolved

    mojo and metrics changes LGTM.

    File chrome/browser/memory_details.cc
    Line 359, Patchset 8 (Latest): memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
    Joe Mason . unresolved

    Nit: how about adding `kMemoryInstrumentationNotAvailable` to `outcome`, so this doesn't need to change?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Francois Pierre Doray
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
      Gerrit-Change-Number: 7029767
      Gerrit-PatchSet: 8
      Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
      Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
      Gerrit-Reviewer: Joe Mason <joenot...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Zijie He <zij...@google.com>
      Gerrit-Attention: Francois Pierre Doray <fdo...@chromium.org>
      Gerrit-Comment-Date: Tue, 14 Oct 2025 22:01:08 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Joe Mason (Gerrit)

      unread,
      Oct 15, 2025, 11:30:39 AMOct 15
      to Francois Pierre Doray, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
      Attention needed from Francois Pierre Doray

      Joe Mason voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Francois Pierre Doray
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
      Gerrit-Change-Number: 7029767
      Gerrit-PatchSet: 9
      Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
      Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
      Gerrit-Reviewer: Joe Mason <joenot...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Zijie He <zij...@google.com>
      Gerrit-Attention: Francois Pierre Doray <fdo...@chromium.org>
      Gerrit-Comment-Date: Wed, 15 Oct 2025 15:30:31 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Joe Mason (Gerrit)

      unread,
      Oct 15, 2025, 11:32:47 AMOct 15
      to Francois Pierre Doray, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
      Attention needed from Francois Pierre Doray

      Joe Mason added 1 comment

      Patchset-level comments
      File-level comment, Patchset 9 (Latest):
      Joe Mason . resolved

      Outdated Votes:

      Code-Review+1 by Joe Mason (copy condition: "changekind:NO_CHANGE OR changekind:NO_CODE_CHANGE OR changekind:TRIVIAL_REBASE OR (has:unchanged-files AND **uploaderin:cria/project-chromium-committers**) OR is:MIN")

      If I'm reading the bolded part (which was in the original message) the account you uploaded with isn't in chromium-committers for some reason?

      Gerrit-Comment-Date: Wed, 15 Oct 2025 15:32:40 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Francois Pierre Doray (Gerrit)

      unread,
      Oct 17, 2025, 12:42:42 PMOct 17
      to Nico Weber, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
      Attention needed from Nico Weber

      Francois Pierre Doray added 6 comments

      File base/trace_event/memory_dump_manager_unittest.cc
      Line 211, Patchset 8: std::optional<ProcessMemoryDumpOutcome> captured_outcome;
      Joe Mason . resolved

      Optional nit: while you're changing this, it could use TestFuture:

      ```
      TestFuture<ProcessMemoryDumpOutcome, uint64_t,
      std::unique_ptr<ProcessMemoryDump>> future;
      mdb->CreateProcessDump(request_args, future.GetSequenceBoundCallback());
      ASSERT_TRUE(future.Wait());
      EXPECT_EQ(future.Get<uint64_t>(), test_guid);
      return future.Get<ProcessMemoryDumpOutcome>();
      ```
      Francois Pierre Doray

      Done

      File chrome/browser/autocomplete/autocomplete_browsertest.cc
      Line 385, Patchset 8: run_loop.QuitClosure()));
      Joe Mason . resolved

      Optional nit: this could be simplified with TestFuture.

      Francois Pierre Doray

      Done

      File chrome/browser/memory_details.cc
      Line 359, Patchset 8: memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
      Joe Mason . resolved

      Nit: how about adding `kMemoryInstrumentationNotAvailable` to `outcome`, so this doesn't need to change?

      Francois Pierre Doray

      I decided not to do that, because "memory instrumentation not available" is not an error that can be returned by the memory instrumentation service, it's only an error case that exists in this specific caller. I didn't want other call sites to have to handle this error, even tough it cannot happen for them.

      File services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
      Line 721, Patchset 8: EXPECT_EQ(outcome, mojom::MemoryDumpRequestOutcome::kSuccess);
      Joe Mason . resolved

      Nit: this isn't needed because EXPECT_CALL already matches only `outcome == kSuccess`.

      Francois Pierre Doray

      Done

      File services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
      Line 520, Patchset 8: ;
      Joe Mason . resolved

      Nit: extra ;

      Francois Pierre Doray

      Done

      File services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
      Line 201, Patchset 8: return captured_outcome.value();
      Joe Mason . resolved

      Optional nit: this could be simplified further with TestFuture.

      Francois Pierre Doray

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Nico Weber
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
        Gerrit-Change-Number: 7029767
        Gerrit-PatchSet: 12
        Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Joe Mason <joenot...@google.com>
        Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Zijie He <zij...@google.com>
        Gerrit-Attention: Nico Weber <tha...@chromium.org>
        Gerrit-Comment-Date: Fri, 17 Oct 2025 16:42:36 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Joe Mason <joenot...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Francois Pierre Doray (Gerrit)

        unread,
        Oct 17, 2025, 12:45:39 PMOct 17
        to Alex Moshchuk, David Song, Nico Weber, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Alex Moshchuk, David Song and Nico Weber

        Francois Pierre Doray added 1 comment

        Francois Pierre Doray . resolved

        thakis@: Please review changes in //chrome and //third_party/blink/renderer/core/exported/web_media_player_impl_unittest.cc

        wintermelons@: Please review changes in //fuchsia_web

        alexmos@: Please review changes in //content.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alex Moshchuk
        • David Song
        • Nico Weber
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
        Gerrit-Change-Number: 7029767
        Gerrit-PatchSet: 12
        Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Reviewer: David Song <winter...@google.com>
        Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Joe Mason <joenot...@google.com>
        Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Zijie He <zij...@google.com>
        Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Attention: Nico Weber <tha...@chromium.org>
        Gerrit-Attention: David Song <winter...@google.com>
        Gerrit-Comment-Date: Fri, 17 Oct 2025 16:45:32 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Francois Pierre Doray (Gerrit)

        unread,
        Oct 17, 2025, 12:46:51 PMOct 17
        to Nate Fischer, Alex Moshchuk, David Song, Nico Weber, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Alex Moshchuk, David Song, Nate Fischer and Nico Weber

        Francois Pierre Doray added 1 comment

        Patchset-level comments
        Francois Pierre Doray . resolved

        thakis@: Please review changes in //chrome and //third_party/blink/renderer/core/exported/web_media_player_impl_unittest.cc

        wintermelons@: Please review changes in //fuchsia_web

        alexmos@: Please review changes in //content

        ntfschr@: Please review changes in //android_webview

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alex Moshchuk
        • David Song
        • Nate Fischer
        • Nico Weber
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
        Gerrit-Change-Number: 7029767
        Gerrit-PatchSet: 12
        Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Reviewer: David Song <winter...@google.com>
        Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Joe Mason <joenot...@google.com>
        Gerrit-Reviewer: Nate Fischer <ntf...@chromium.org>
        Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Zijie He <zij...@google.com>
        Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Attention: Nico Weber <tha...@chromium.org>
        Gerrit-Attention: David Song <winter...@google.com>
        Gerrit-Attention: Nate Fischer <ntf...@chromium.org>
        Gerrit-Comment-Date: Fri, 17 Oct 2025 16:46:45 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        David Song (Gerrit)

        unread,
        Oct 17, 2025, 1:09:57 PMOct 17
        to Francois Pierre Doray, Nate Fischer, Alex Moshchuk, Nico Weber, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Alex Moshchuk, Francois Pierre Doray, Nate Fischer and Nico Weber

        David Song voted and added 1 comment

        Votes added by David Song

        Code-Review+1

        1 comment

        Patchset-level comments
        David Song . resolved

        //fuchsia_web lgtm

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alex Moshchuk
        • Francois Pierre Doray
        • Nate Fischer
        • Nico Weber
        Gerrit-Attention: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Attention: Nate Fischer <ntf...@chromium.org>
        Gerrit-Comment-Date: Fri, 17 Oct 2025 17:09:44 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Alex Moshchuk (Gerrit)

        unread,
        Oct 17, 2025, 1:16:56 PMOct 17
        to Francois Pierre Doray, David Song, Nate Fischer, Nico Weber, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Francois Pierre Doray, Nate Fischer and Nico Weber

        Alex Moshchuk voted and added 1 comment

        Votes added by Alex Moshchuk

        Code-Review+1

        1 comment

        Patchset-level comments
        Alex Moshchuk . resolved

        content/ LGTM

        Open in Gerrit

        Related details

        Attention is currently required from:
        Gerrit-Attention: Nico Weber <tha...@chromium.org>
        Gerrit-Attention: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Attention: Nate Fischer <ntf...@chromium.org>
        Gerrit-Comment-Date: Fri, 17 Oct 2025 17:16:42 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Nico Weber (Gerrit)

        unread,
        Oct 17, 2025, 2:45:04 PMOct 17
        to Francois Pierre Doray, Nico Weber, Alex Moshchuk, David Song, Nate Fischer, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Francois Pierre Doray and Nate Fischer

        Nico Weber voted and added 7 comments

        Votes added by Nico Weber

        Code-Review+1
        Owners-Override+1

        7 comments

        Patchset-level comments
        Nico Weber . resolved

        In the future, let's just do one thing per CL? 😊

        File base/trace_event/memory_dump_manager_unittest.cc
        Line 215, Patchset 12 (Latest): test::TestFuture<ProcessMemoryDumpOutcome, uint64_t,
        Nico Weber . unresolved

        unrelated refactoring

        File chrome/browser/autocomplete/autocomplete_browsertest.cc
        Line 369, Patchset 12 (Latest): base::test::TestFuture<base::trace_event::ProcessMemoryDumpOutcome, uint64_t,
        Nico Weber . unresolved

        likewise

        File chrome/browser/memory_details.h
        Line 167, Patchset 12 (Latest): std::optional<memory_instrumentation::mojom::MemoryDumpRequestOutcome>
        Nico Weber . unresolved

        If we're adding an enum, why not make "service not available" an enum entry instead of wrapping in an optional?

        File content/browser/tracing/memory_tracing_browsertest.cc
        Line 71, Patchset 12 (Latest): memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
        Nico Weber . unresolved

        especially in this file it'd be nice if this had a shorter name somehow 😄

        File services/resource_coordinator/memory_instrumentation/queued_request.h
        Line 112, Patchset 12 (Parent): int failed_memory_dump_count = 0;
        Nico Weber . unresolved

        say in cl desc that you're removing the counter in addition to changing bool to enum

        File services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
        Line 188, Patchset 12 (Latest): base::test::TestFuture<
        Nico Weber . unresolved

        unrelated rewrite again

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Francois Pierre Doray
        • Nate Fischer
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
        Gerrit-Change-Number: 7029767
        Gerrit-PatchSet: 12
        Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Reviewer: David Song <winter...@google.com>
        Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Reviewer: Joe Mason <joenot...@google.com>
        Gerrit-Reviewer: Nate Fischer <ntf...@chromium.org>
        Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Zijie He <zij...@google.com>
        Gerrit-Attention: Francois Pierre Doray <fdo...@chromium.org>
        Gerrit-Attention: Nate Fischer <ntf...@chromium.org>
        Gerrit-Comment-Date: Fri, 17 Oct 2025 18:44:57 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Nate Fischer (Gerrit)

        unread,
        Oct 17, 2025, 8:17:04 PMOct 17
        to Francois Pierre Doray, Nico Weber, Alex Moshchuk, David Song, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org
        Attention needed from Francois Pierre Doray

        Nate Fischer voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Francois Pierre Doray
        Gerrit-Comment-Date: Sat, 18 Oct 2025 00:16:52 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Francois Pierre Doray (Gerrit)

        unread,
        Oct 17, 2025, 9:25:46 PMOct 17
        to Nate Fischer, Nico Weber, Alex Moshchuk, David Song, Chromium Metrics Reviews, Zijie He, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

        Francois Pierre Doray voted and added 8 comments

        Votes added by Francois Pierre Doray

        Commit-Queue+2

        8 comments

        Patchset-level comments
        Nico Weber . resolved

        In the future, let's just do one thing per CL? 😊

        Francois Pierre Doray

        ack, sorry about that

        Francois Pierre Doray . resolved

        Thanks for the review!

        File base/trace_event/memory_dump_manager_unittest.cc
        Line 215, Patchset 12: test::TestFuture<ProcessMemoryDumpOutcome, uint64_t,
        Nico Weber . resolved

        unrelated refactoring

        Francois Pierre Doray

        Indeed, it's unrelated. It was suggested here https://chromium-review.googlesource.com/c/chromium/src/+/7029767/12#message-ac0dd336de03cafb00e0140a6d1ade46c0b68e1e and I decided it made sense to simplify the code as part of this CL. I'll keep it as-is to avoid extra churn on this CL.

        File chrome/browser/autocomplete/autocomplete_browsertest.cc
        Line 369, Patchset 12: base::test::TestFuture<base::trace_event::ProcessMemoryDumpOutcome, uint64_t,
        Nico Weber . resolved

        likewise

        Francois Pierre Doray

        same

        File chrome/browser/memory_details.h
        Line 167, Patchset 12: std::optional<memory_instrumentation::mojom::MemoryDumpRequestOutcome>
        Nico Weber . resolved

        If we're adding an enum, why not make "service not available" an enum entry instead of wrapping in an optional?

        Francois Pierre Doray

        "Service not available" is not an error that can be returned by the Memory Instrumentation service, it's an error case that only exists in MemoryDetails. I decided not to add it as an enum value so that other parts of the codebase don't have to handle this error case.

        File content/browser/tracing/memory_tracing_browsertest.cc
        Line 71, Patchset 12: memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
        Nico Weber . resolved

        especially in this file it'd be nice if this had a shorter name somehow 😄

        Francois Pierre Doray

        I shortened the name in latest patch set

        File services/resource_coordinator/memory_instrumentation/queued_request.h
        Line 112, Patchset 12 (Parent): int failed_memory_dump_count = 0;
        Nico Weber . resolved

        say in cl desc that you're removing the counter in addition to changing bool to enum

        Francois Pierre Doray

        Done

        File services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
        Line 188, Patchset 12: base::test::TestFuture<
        Nico Weber . resolved

        unrelated rewrite again

        Francois Pierre Doray

        same

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
          Gerrit-Change-Number: 7029767
          Gerrit-PatchSet: 16
          Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
          Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
          Gerrit-Reviewer: David Song <winter...@google.com>
          Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
          Gerrit-Reviewer: Joe Mason <joenot...@google.com>
          Gerrit-Reviewer: Nate Fischer <ntf...@chromium.org>
          Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Zijie He <zij...@google.com>
          Gerrit-Comment-Date: Sat, 18 Oct 2025 01:25:38 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          Oct 18, 2025, 1:52:04 AMOct 18
          to Francois Pierre Doray, Nate Fischer, Nico Weber, Alex Moshchuk, David Song, Chromium Metrics Reviews, Zijie He, AyeAye, chromium...@chromium.org, devtools...@chromium.org, asvitkine...@chromium.org, fuchsia...@chromium.org, android-web...@chromium.org, asvitki...@chromium.org, blink-...@chromium.org, chrome-gr...@chromium.org, chromiumme...@microsoft.com, feature-me...@chromium.org, ipc-securi...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, performance-m...@chromium.org, spang...@chromium.org, tracing...@chromium.org, wfh+...@chromium.org

          Chromium LUCI CQ submitted the change with unreviewed changes

          Unreviewed changes

          12 is the latest approved patch-set.
          The change was submitted with unreviewed changes in the following files:

          ```
          The name of the file: services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom
          Insertions: 9, Deletions: 9.

          @@ -64,8 +64,8 @@
          // These values are persisted to logs. Entries should not be renumbered and
          // numeric values should never be reused.
          //
          -// LINT.IfChange(MemoryDumpRequestOutcome)
          -enum MemoryDumpRequestOutcome {
          +// LINT.IfChange(RequestOutcome)
          +enum RequestOutcome {
          // Dump was produced successfully.
          kSuccess = 0,
          // Periodic dump request was made with the same level of details as an already
          @@ -90,7 +90,7 @@
          // base::trace_event::MemoryDumpManager::CreateProcessDump failed.
          kInProcessMemoryDumpFailed = 9,
          };
          -// LINT.ThenChange(/tools/metrics/histograms/metadata/memory/enums.xml:MemoryDumpRequestOutcome)
          +// LINT.ThenChange(/tools/metrics/histograms/metadata/memory/enums.xml:RequestOutcome)

          // These structs are internal only (only for the communication between
          // the service and the ClientProcess library).
          @@ -317,7 +317,7 @@
          // buffer of the target process and an ACK. A summary of the dump is also
          // returned in case of success.
          RequestChromeMemoryDump(RequestArgs args)
          - => (MemoryDumpRequestOutcome outcome,
          + => (RequestOutcome outcome,
          uint64 dump_id,
          RawProcessMemoryDump? raw_process_memory_dump);

          @@ -339,7 +339,7 @@
          MemoryMapOption option,
          array<MemDumpFlags> flags,
          array<mojo_base.mojom.ProcessId> pids)
          - => (MemoryDumpRequestOutcome outcome, map<mojo_base.mojom.ProcessId, RawOSMemDump> dumps);
          + => (RequestOutcome outcome, map<mojo_base.mojom.ProcessId, RawOSMemDump> dumps);
          };

          struct HeapProfileResult {
          @@ -396,26 +396,26 @@
          LevelOfDetail level_of_detail,
          Determinism determinism,
          array<string> allocator_dump_names)
          - => (MemoryDumpRequestOutcome outcome, GlobalMemoryDump? global_memory_dump);
          + => (RequestOutcome outcome, GlobalMemoryDump? global_memory_dump);

          // Sends a dump request to the client process given by the specified pid and
          // returns a summarized dump back or null if there was a failure.
          RequestGlobalMemoryDumpForPid(
          mojo_base.mojom.ProcessId pid, array<string> allocator_dump_names)
          - => (MemoryDumpRequestOutcome outcome, GlobalMemoryDump? global_memory_dump);
          + => (RequestOutcome outcome, GlobalMemoryDump? global_memory_dump);

          // Requesting a null pid is the same as requesting all pids.
          // The returned dump only contains OS metrics. |chrome_allocator_dumps| will
          // be empty.
          RequestPrivateMemoryFootprint(mojo_base.mojom.ProcessId pid)
          - => (MemoryDumpRequestOutcome outcome, GlobalMemoryDump? global_memory_dump);
          + => (RequestOutcome outcome, GlobalMemoryDump? global_memory_dump);

          // Broadcasts a dump request to all registered client processes and injects
          // the dump in the trace buffer (if tracing is enabled).
          RequestGlobalMemoryDumpAndAppendToTrace(DumpType dump_type,
          LevelOfDetail level_of_detail,
          Determinism determinism)
          - => (MemoryDumpRequestOutcome outcome, uint64 dump_id);
          + => (RequestOutcome outcome, uint64 dump_id);
          };

          // An interface used by client processes to register themselves with a
          ```
          ```
          The name of the file: services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
          Insertions: 6, Deletions: 8.

          @@ -122,12 +122,11 @@
          if (!process_memory_dump) {
          // TODO(crbug.com/450929521): In practice, this never happens. Add a CHECK
          // in a separate CL.
          - std::move(callback).Run(
          - mojom::MemoryDumpRequestOutcome::kInProcessMemoryDumpFailed, dump_guid,
          - nullptr);
          + std::move(callback).Run(mojom::RequestOutcome::kInProcessMemoryDumpFailed,
          + dump_guid, nullptr);
          return;
          }
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess, dump_guid,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess, dump_guid,
          std::move(process_memory_dump));
          }

          @@ -187,8 +186,7 @@
          }

          void ClientProcessImpl::PerformOSMemoryDump(OSMemoryDumpArgs args) {
          - mojom::MemoryDumpRequestOutcome outcome =
          - mojom::MemoryDumpRequestOutcome::kSuccess;
          + mojom::RequestOutcome outcome = mojom::RequestOutcome::kSuccess;
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          for (const base::ProcessId& pid : args.pids) {
          auto handle = base::Process::Open(pid).Handle();
          @@ -198,13 +196,13 @@
          if (!OSMetrics::FillOSMemoryDump(handle, args.flags, result.get())) {
          DLOG(ERROR) << "OS memory dump failed for pid " << pid
          << " (FillOSMemoryDump)";
          - outcome = mojom::MemoryDumpRequestOutcome::kFillOsMemoryDumpFailed;
          + outcome = mojom::RequestOutcome::kFillOsMemoryDumpFailed;
          } else if (args.mmap_option != mojom::MemoryMapOption::NONE &&
          !OSMetrics::FillProcessMemoryMaps(handle, args.mmap_option,
          result.get())) {
          DLOG(ERROR) << "OS memory dump failed for pid " << pid
          << " (FillProcessMemoryMaps)";
          - outcome = mojom::MemoryDumpRequestOutcome::kFillProcessMemoryMapsFailed;
          + outcome = mojom::RequestOutcome::kFillProcessMemoryMapsFailed;
          } else {
          results[pid] = std::move(result);
          }
          ```
          ```
          The name of the file: chrome/browser/task_manager/sampling/task_manager_impl.cc
          Insertions: 1, Deletions: 1.

          @@ -600,7 +600,7 @@
          }

          void TaskManagerImpl::OnReceivedMemoryDump(
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump) {
          waiting_for_memory_dump_ = false;
          // We can ignore `outcome` as it is a coarse grained indicator of whether the
          ```
          ```
          The name of the file: tools/metrics/histograms/metadata/memory/histograms.xml
          Insertions: 1, Deletions: 1.

          @@ -2079,7 +2079,7 @@
          <summary>The memory size freed by each low memory kill event.</summary>
          </histogram>

          -<histogram name="Memory.MemoryDumpOutcome" enum="MemoryDumpRequestOutcome"
          +<histogram name="Memory.MemoryDumpOutcome" enum="RequestOutcome"
          expires_after="2026-04-12">
          <owner>fdo...@chromium.org</owner>
          <owner>catan...@chromium.org</owner>
          ```
          ```
          The name of the file: components/performance_manager/resource_attribution/memory_measurement_delegate.cc
          Insertions: 5, Deletions: 7.

          @@ -48,10 +48,9 @@
          base::OnceCallback<void(MemorySummaryMap)> callback) final;

          private:
          - void OnMemorySummary(
          - base::OnceCallback<void(MemorySummaryMap)> callback,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          - std::unique_ptr<GlobalMemoryDump> memory_dump);
          + void OnMemorySummary(base::OnceCallback<void(MemorySummaryMap)> callback,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          + std::unique_ptr<GlobalMemoryDump> memory_dump);

          raw_ptr<GraphImpl> graph_impl_;
          base::WeakPtrFactory<MemoryMeasurementDelegateImpl> weak_factory_{this};
          @@ -77,10 +76,9 @@

          void MemoryMeasurementDelegateImpl::OnMemorySummary(
          base::OnceCallback<void(MemorySummaryMap)> callback,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<GlobalMemoryDump> memory_dump) {
          - if (outcome !=
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome != memory_instrumentation::mojom::RequestOutcome::kSuccess) {
          std::move(callback).Run(CreateMemorySummaryMap());
          return;
          }
          ```
          ```
          The name of the file: content/browser/tracing/memory_instrumentation_browsertest.cc
          Insertions: 4, Deletions: 5.

          @@ -51,14 +51,13 @@
          base::GetCurrentProcId(),
          base::BindOnce(
          [](base::OnceClosure quit_closure, uint64_t* private_footprint_kb,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome
          - outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<GlobalMemoryDump> result) {
          // The global dump should only contain the current process
          // (browser).
          - EXPECT_EQ(memory_instrumentation::mojom::
          - MemoryDumpRequestOutcome::kSuccess,
          - outcome);
          + EXPECT_EQ(
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          + outcome);
          ASSERT_EQ(std::distance(result->process_dumps().begin(),
          result->process_dumps().end()),
          1);
          ```
          ```
          The name of the file: content/browser/tracing/memory_tracing_browsertest.cc
          Insertions: 16, Deletions: 62.

          @@ -35,6 +35,7 @@
          using base::trace_event::MemoryDumpManager;
          using base::trace_event::MemoryDumpType;
          using base::trace_event::ProcessMemoryDump;
          +using memory_instrumentation::mojom::RequestOutcome;
          using testing::_;
          using testing::Return;

          @@ -55,7 +56,7 @@
          scoped_refptr<base::SingleThreadTaskRunner> task_runner,
          base::OnceClosure closure,
          uint32_t request_index,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + RequestOutcome outcome,
          uint64_t dump_guid) {
          // Make sure we run the RunLoop closure on the same thread that originated
          // the run loop (which is the IN_PROC_BROWSER_TEST_F main thread).
          @@ -67,8 +68,7 @@
          dump_guid));
          return;
          }
          - if (outcome ==
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome == RequestOutcome::kSuccess) {
          EXPECT_NE(0u, dump_guid);
          }
          OnMemoryDumpDone(request_index, outcome);
          @@ -174,10 +174,8 @@
          EXPECT_TRUE(NavigateToURL(shell, GetTestUrl("", "title1.html")));
          }

          - MOCK_METHOD2(
          - OnMemoryDumpDone,
          - void(uint32_t request_index,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome));
          + MOCK_METHOD2(OnMemoryDumpDone,
          + void(uint32_t request_index, RequestOutcome outcome));

          std::unique_ptr<MockDumpProvider> mock_dump_provider_;
          uint32_t next_request_index_;
          @@ -211,11 +209,7 @@
          Navigate(shell());

          EXPECT_CALL(*mock_dump_provider_, OnMemoryDump(_,_)).WillOnce(Return(true));
          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - _,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(_, RequestOutcome::kSuccess));

          EnableMemoryTracing();
          RequestGlobalDumpAndWait(false /* from_renderer_thread */,
          @@ -238,11 +232,7 @@
          Navigate(shell());

          EXPECT_CALL(*mock_dump_provider_, OnMemoryDump(_,_)).WillOnce(Return(true));
          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - _,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(_, RequestOutcome::kSuccess));

          EnableMemoryTracing();
          RequestGlobalDumpAndWait(true /* from_renderer_thread */,
          @@ -264,11 +254,7 @@
          EXPECT_CALL(*mock_dump_provider_, OnMemoryDump(_,_))
          .Times(4)
          .WillRepeatedly(Return(true));
          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - _, memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess))
          - .Times(4);
          + EXPECT_CALL(*this, OnMemoryDumpDone(_, RequestOutcome::kSuccess)).Times(4);

          EnableMemoryTracing();
          RequestGlobalDumpAndWait(true /* from_renderer_thread */,
          @@ -312,69 +298,41 @@
          .Times(5)
          .WillRepeatedly(Return(true));

          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - 0,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(0, RequestOutcome::kSuccess));
          RequestGlobalDump(true /* from_renderer_thread */,
          MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kDetailed);

          // This dump should fail immediately because there's already a detailed dump
          // request in the queue.
          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - 1,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kRedundant));
          + EXPECT_CALL(*this, OnMemoryDumpDone(1, RequestOutcome::kRedundant));
          RequestGlobalDump(true /* from_renderer_thread */,
          MemoryDumpType::kPeriodicInterval,
          MemoryDumpLevelOfDetail::kDetailed);

          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - 2,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(2, RequestOutcome::kSuccess));
          RequestGlobalDump(true /* from_renderer_thread */,
          MemoryDumpType::kPeriodicInterval,
          MemoryDumpLevelOfDetail::kLight);

          // This dump should fail immediately because there's already a light dump
          // request in the queue.
          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - 3,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kRedundant));
          + EXPECT_CALL(*this, OnMemoryDumpDone(3, RequestOutcome::kRedundant));
          RequestGlobalDump(true /* from_renderer_thread */,
          MemoryDumpType::kPeriodicInterval,
          MemoryDumpLevelOfDetail::kLight);

          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - 4,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(4, RequestOutcome::kSuccess));
          RequestGlobalDump(true /* from_renderer_thread */,
          MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kLight);

          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - 5,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(5, RequestOutcome::kSuccess));
          RequestGlobalDumpAndWait(true /* from_renderer_thread */,
          MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kDetailed);

          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - 6,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(6, RequestOutcome::kSuccess));
          RequestGlobalDumpAndWait(true /* from_renderer_thread */,
          MemoryDumpType::kPeriodicInterval,
          MemoryDumpLevelOfDetail::kLight);
          @@ -407,11 +365,7 @@
          // crbug.com/709524. The test still tests if dumping does not crash.
          EXPECT_CALL(*this, OnMemoryDumpDone(_, _));
          #else
          - EXPECT_CALL(
          - *this,
          - OnMemoryDumpDone(
          - _,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess));
          + EXPECT_CALL(*this, OnMemoryDumpDone(_, RequestOutcome::kSuccess));
          #endif

          EnableMemoryTracing();
          ```
          ```
          The name of the file: chrome/browser/memory_details.cc
          Insertions: 3, Deletions: 5.

          @@ -356,7 +356,7 @@
          base::kNullProcessId,
          base::BindOnce(
          [](scoped_refptr<MemoryDetails> details,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump>
          global_dump) {
          details->DidReceiveMemoryDump(outcome, std::move(global_dump));
          @@ -368,12 +368,10 @@
          }

          void MemoryDetails::DidReceiveMemoryDump(
          - std::optional<memory_instrumentation::mojom::MemoryDumpRequestOutcome>
          - outcome,
          + std::optional<memory_instrumentation::mojom::RequestOutcome> outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> global_dump) {
          ProcessData* const chrome_browser = ChromeBrowser();
          - if (outcome ==
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome == memory_instrumentation::mojom::RequestOutcome::kSuccess) {
          for (const memory_instrumentation::GlobalMemoryDump::ProcessDump& dump :
          global_dump->process_dumps()) {
          base::ProcessId dump_pid = dump.pid();
          ```
          ```
          The name of the file: components/heap_profiling/multi_process/supervisor.cc
          Insertions: 2, Deletions: 2.

          @@ -142,7 +142,7 @@

          auto finished_dump_callback = base::BindOnce(
          [](TraceFinishedCallback callback, bool anonymize,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          uint64_t dump_guid) {
          // Once the trace has stopped, run |callback| on the UI thread.
          auto finish_sink_callback = base::BindOnce(
          @@ -166,7 +166,7 @@

          auto trigger_memory_dump_callback = base::BindOnce(
          [](base::OnceCallback<void(
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          uint64_t dump_guid)> finished_dump_callback) {
          memory_instrumentation::MemoryInstrumentation::GetInstance()
          ->RequestGlobalDumpAndAppendToTrace(
          ```
          ```
          The name of the file: components/no_state_prefetch/browser/no_state_prefetch_contents.h
          Insertions: 1, Deletions: 1.

          @@ -241,7 +241,7 @@

          // Returns the ProcessMetrics for the render process, if it exists.
          void DidGetMemoryUsage(
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump);

          // Sets PreloadingFailureReason based on status corresponding to the
          ```
          ```
          The name of the file: chrome/test/base/memory_tracing_browsertest.cc
          Insertions: 1, Deletions: 1.

          @@ -34,7 +34,7 @@

          void RequestGlobalDumpCallback(
          base::OnceClosure quit_closure,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          uint64_t) {
          base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
          FROM_HERE, std::move(quit_closure));
          ```
          ```
          The name of the file: services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.h
          Insertions: 2, Deletions: 2.

          @@ -29,11 +29,11 @@
          void(bool, uint64_t, memory_instrumentation::mojom::GlobalMemoryDumpPtr)>;
          using ChromeCallback = base::RepeatingCallback<void(
          base::ProcessId,
          - mojom::MemoryDumpRequestOutcome,
          + mojom::RequestOutcome,
          uint64_t,
          std::unique_ptr<base::trace_event::ProcessMemoryDump>)>;
          using OsCallback = base::RepeatingCallback<
          - void(base::ProcessId, mojom::MemoryDumpRequestOutcome, OSMemDumpMap)>;
          + void(base::ProcessId, mojom::RequestOutcome, OSMemDumpMap)>;
          using VmRegions =
          base::flat_map<base::ProcessId,
          std::vector<memory_instrumentation::mojom::VmRegionPtr>>;
          ```
          ```
          The name of the file: tools/metrics/histograms/metadata/memory/enums.xml
          Insertions: 9, Deletions: 9.

          @@ -47,9 +47,15 @@
          <int value="2" label="kSuccess"/>
          </enum>

          -<!-- LINT.IfChange(MemoryDumpRequestOutcome) -->
          +<enum name="MemoryPressureLevel">
          + <int value="0" label="No memory pressure"/>
          + <int value="1" label="Moderate memory pressure"/>
          + <int value="2" label="Critical memory pressure"/>
          +</enum>

          -<enum name="MemoryDumpRequestOutcome">
          +<!-- LINT.IfChange(RequestOutcome) -->
          +
          +<enum name="RequestOutcome">
          <int value="0" label="Success"/>
          <int value="1"
          label="Periodic dump request was made with the same level of details as
          @@ -70,13 +76,7 @@
          label="base::trace_event::MemoryDumpManager::CreateProcessDump failed"/>
          </enum>

          -<!-- LINT.ThenChange(//services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom:MemoryDumpRequestOutcome) -->
          -
          -<enum name="MemoryPressureLevel">
          - <int value="0" label="No memory pressure"/>
          - <int value="1" label="Moderate memory pressure"/>
          - <int value="2" label="Critical memory pressure"/>
          -</enum>
          +<!-- LINT.ThenChange(//services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom:RequestOutcome) -->

          <enum name="SelfCompactionCancellationReason">
          <int value="0" label="Frozen by App Freezer"/>
          ```
          ```
          The name of the file: chrome/browser/task_manager/sampling/task_manager_impl.h
          Insertions: 1, Deletions: 1.

          @@ -126,7 +126,7 @@
          void OnVideoMemoryUsageStatsUpdate(
          const gpu::VideoMemoryUsageStats& gpu_memory_stats);
          void OnReceivedMemoryDump(
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump);

          // task_manager::TaskManagerInterface:
          ```
          ```
          The name of the file: chrome/browser/metrics/process_memory_metrics_emitter.cc
          Insertions: 2, Deletions: 3.

          @@ -1381,13 +1381,12 @@

          void ProcessMemoryMetricsEmitter::ReceivedMemoryDump(
          absl::flat_hash_map<base::ProcessId, ProcessInfo> process_infos,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<GlobalMemoryDump> dump) {
          DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
          base::UmaHistogramEnumeration("Memory.MemoryDumpOutcome", outcome);

          - if (outcome !=
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome != memory_instrumentation::mojom::RequestOutcome::kSuccess) {
          return;
          }

          ```
          ```
          The name of the file: services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
          Insertions: 6, Deletions: 8.

          @@ -186,7 +186,7 @@
          base::trace_event::MemoryDumpLevelOfDetailToString(
          request->args.level_of_detail));

          - request->outcome = mojom::MemoryDumpRequestOutcome::kSuccess;
          + request->outcome = mojom::RequestOutcome::kSuccess;

          // Note: the service process itself is registered as a ClientProcess and
          // will be treated like any other process for the sake of memory dumps.
          @@ -272,7 +272,7 @@
          request->pending_responses.empty()) {
          DLOG(ERROR) << "Memory dump request failed due to missing pid "
          << request->args.pid;
          - request->outcome = mojom::MemoryDumpRequestOutcome::kProcessNotFound;
          + request->outcome = mojom::RequestOutcome::kProcessNotFound;
          return;
          }
          }
          @@ -502,8 +502,7 @@
          DLOG(ERROR) << "Tracing is disabled or not setup yet while receiving "
          "OS dump for pid "
          << pid;
          - request->outcome =
          - mojom::MemoryDumpRequestOutcome::kInvalidTracingState;
          + request->outcome = mojom::RequestOutcome::kInvalidTracingState;
          }
          }

          @@ -515,8 +514,7 @@
          DLOG(ERROR) << "Tracing is disabled or not setup yet while receiving "
          "Chrome dump for pid "
          << pid;
          - request->outcome =
          - mojom::MemoryDumpRequestOutcome::kInvalidTracingState;
          + request->outcome = mojom::RequestOutcome::kInvalidTracingState;
          }
          }
          }
          @@ -574,7 +572,7 @@
          // In the single process-case, we want to ensure that global_success
          // is true if and only if global_dump is not nullptr.
          if (request->args.pid != base::kNullProcessId &&
          - request->outcome != mojom::MemoryDumpRequestOutcome::kSuccess) {
          + request->outcome != mojom::RequestOutcome::kSuccess) {
          global_dump = nullptr;
          }
          auto& callback = request->callback;
          @@ -586,7 +584,7 @@
          TRACE_EVENT_NESTABLE_ASYNC_END2(
          base::trace_event::MemoryDumpManager::kTraceCategory, "GlobalMemoryDump",
          TRACE_ID_LOCAL(request->dump_guid), "dump_guid", TRACE_STR_COPY(guid_str),
          - "success", request->outcome == mojom::MemoryDumpRequestOutcome::kSuccess);
          + "success", request->outcome == mojom::RequestOutcome::kSuccess);
          }

          bool QueuedRequestDispatcher::AddChromeMemoryDumpToTrace(
          ```
          ```
          The name of the file: services/resource_coordinator/memory_instrumentation/queued_request.h
          Insertions: 2, Deletions: 3.

          @@ -30,7 +30,7 @@
          // Holds data for pending requests enqueued via RequestGlobalMemoryDump().
          struct QueuedRequest {
          using RequestGlobalMemoryDumpInternalCallback = base::OnceCallback<void(
          - mojom::MemoryDumpRequestOutcome,
          + mojom::RequestOutcome,
          uint64_t,
          memory_instrumentation::mojom::GlobalMemoryDumpPtr)>;

          @@ -115,8 +115,7 @@
          // The request's outcome up to now. This is updated whenever an error is
          // encountered as part of fulfilling the request. If multiple errors occur,
          // this will only represent the last encountered error.
          - mojom::MemoryDumpRequestOutcome outcome =
          - mojom::MemoryDumpRequestOutcome::kSuccess;
          + mojom::RequestOutcome outcome = mojom::RequestOutcome::kSuccess;
          bool dump_in_progress = false;

          // This field is set to |true| before a heap dump is requested, and set to
          ```
          ```
          The name of the file: fuchsia_web/webengine/browser/web_engine_memory_inspector.h
          Insertions: 1, Deletions: 1.

          @@ -39,7 +39,7 @@
          void OnMemoryDumpComplete(
          base::TimeTicks requested_at,
          fpromise::suspended_task task,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          memory_instrumentation::mojom::GlobalMemoryDumpPtr raw_dump);

          // Node holding memory usage information.
          ```
          ```
          The name of the file: services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h
          Insertions: 2, Deletions: 3.

          @@ -26,11 +26,10 @@
          using MemoryDumpLevelOfDetail = base::trace_event::MemoryDumpLevelOfDetail;
          using MemoryDumpDeterminism = base::trace_event::MemoryDumpDeterminism;
          using RequestGlobalDumpCallback =
          - base::OnceCallback<void(mojom::MemoryDumpRequestOutcome outcome,
          + base::OnceCallback<void(mojom::RequestOutcome outcome,
          std::unique_ptr<GlobalMemoryDump> dump)>;
          using RequestGlobalMemoryDumpAndAppendToTraceCallback =
          - base::OnceCallback<void(mojom::MemoryDumpRequestOutcome outcome,
          - uint64_t dump_id)>;
          + base::OnceCallback<void(mojom::RequestOutcome outcome, uint64_t dump_id)>;

          static void CreateInstance(
          mojo::PendingRemote<memory_instrumentation::mojom::Coordinator>
          ```
          ```
          The name of the file: services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc
          Insertions: 1, Deletions: 1.

          @@ -16,7 +16,7 @@

          void WrapGlobalMemoryDump(
          MemoryInstrumentation::RequestGlobalDumpCallback callback,
          - mojom::MemoryDumpRequestOutcome outcome,
          + mojom::RequestOutcome outcome,
          mojom::GlobalMemoryDumpPtr dump) {
          std::move(callback).Run(outcome, GlobalMemoryDump::MoveFrom(std::move(dump)));
          }
          ```
          ```
          The name of the file: chrome/browser/metrics/process_memory_metrics_emitter.h
          Insertions: 1, Deletions: 1.

          @@ -61,7 +61,7 @@
          // performance_manager for each process.
          virtual void ReceivedMemoryDump(
          absl::flat_hash_map<base::ProcessId, ProcessInfo> process_infos,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump);

          // Virtual for testing. Gets info about each process from performance_manager.
          ```
          ```
          The name of the file: content/browser/devtools/protocol/tracing_handler.cc
          Insertions: 2, Deletions: 3.

          @@ -1031,12 +1031,11 @@

          void TracingHandler::OnMemoryDumpFinished(
          std::unique_ptr<RequestMemoryDumpCallback> callback,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          uint64_t dump_id) {
          callback->sendSuccess(
          base::StringPrintf("0x%" PRIx64, dump_id),
          - outcome ==
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess);
          + outcome == memory_instrumentation::mojom::RequestOutcome::kSuccess);
          }

          void TracingHandler::OnFrameFromVideoConsumer(
          ```
          ```
          The name of the file: services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
          Insertions: 11, Deletions: 11.

          @@ -178,7 +178,7 @@
          // Blocks the current thread (spinning a nested message loop) until the
          // memory dump is complete. Returns:
          // - return value: the |outcome| from the RequestChromeMemoryDump() callback.
          - mojom::MemoryDumpRequestOutcome RequestChromeDumpAndWait(
          + mojom::RequestOutcome RequestChromeDumpAndWait(
          MemoryDumpType dump_type,
          MemoryDumpLevelOfDetail level_of_detail,
          std::unique_ptr<base::trace_event::ProcessMemoryDump>* result = nullptr) {
          @@ -186,7 +186,7 @@
          MemoryDumpRequestArgs request_args{req_guid, dump_type, level_of_detail};

          base::test::TestFuture<
          - mojom::MemoryDumpRequestOutcome, uint64_t,
          + mojom::RequestOutcome, uint64_t,
          std::unique_ptr<base::trace_event::ProcessMemoryDump>>
          future;
          client_process_->RequestChromeMemoryDump(request_args,
          @@ -200,7 +200,7 @@
          tuple));
          }

          - return std::get<mojom::MemoryDumpRequestOutcome>(tuple);
          + return std::get<mojom::RequestOutcome>(tuple);
          }

          void RequestChromeDump(MemoryDumpType dump_type,
          @@ -264,7 +264,7 @@
          const std::vector<std::string>& allocator_dump_names,
          RequestGlobalMemoryDumpCallback callback) {
          client_->RequestChromeDump(dump_type, level_of_detail, determinism);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          mojom::GlobalMemoryDumpPtr());
          }

          @@ -274,7 +274,7 @@
          MemoryDumpDeterminism determinism,
          RequestGlobalMemoryDumpAndAppendToTraceCallback callback) {
          client_->RequestChromeDump(dump_type, level_of_detail, determinism);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess, true);
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess, true);
          }

          // Checks that is the ClientProcessImpl is initialized after tracing already
          @@ -292,7 +292,7 @@
          MockMemoryDumpProvider mdp;
          RegisterDumpProvider(&mdp, nullptr, MemoryDumpProvider::Options());
          EXPECT_CALL(mdp, OnMemoryDump(_, _)).Times(1);
          - EXPECT_EQ(mojom::MemoryDumpRequestOutcome::kSuccess,
          + EXPECT_EQ(mojom::RequestOutcome::kSuccess,
          RequestChromeDumpAndWait(MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kDetailed));
          DisableTracing();
          @@ -335,12 +335,12 @@

          // When requesting non-BACKGROUND dumps the MDP will be invoked.
          EXPECT_CALL(*mdp, OnMemoryDump(IsLightDump(), _));
          - EXPECT_EQ(mojom::MemoryDumpRequestOutcome::kSuccess,
          + EXPECT_EQ(mojom::RequestOutcome::kSuccess,
          RequestChromeDumpAndWait(MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kLight));

          EXPECT_CALL(*mdp, OnMemoryDump(IsDetailedDump(), _));
          - EXPECT_EQ(mojom::MemoryDumpRequestOutcome::kSuccess,
          + EXPECT_EQ(mojom::RequestOutcome::kSuccess,
          RequestChromeDumpAndWait(MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kDetailed));

          @@ -470,7 +470,7 @@

          EnableMemoryInfraTracing();
          EXPECT_FALSE(IsPeriodicDumpingEnabled());
          - EXPECT_EQ(mojom::MemoryDumpRequestOutcome::kSuccess,
          + EXPECT_EQ(mojom::RequestOutcome::kSuccess,
          RequestChromeDumpAndWait(MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kBackground));
          DisableTracing();
          @@ -509,7 +509,7 @@
          run_loop.QuitClosure()));
          run_loop.Run();

          - EXPECT_EQ(mojom::MemoryDumpRequestOutcome::kSuccess,
          + EXPECT_EQ(mojom::RequestOutcome::kSuccess,
          RequestChromeDumpAndWait(MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kDetailed));
          DisableTracing();
          @@ -523,7 +523,7 @@
          // after having checked that the MDP is valid and having decided to invoke it.
          TraceLog::GetInstance()->SetEnabled(TraceConfig(
          kMemoryInfraTracingOnly, base::trace_event::RECORD_CONTINUOUSLY));
          - EXPECT_EQ(mojom::MemoryDumpRequestOutcome::kSuccess,
          + EXPECT_EQ(mojom::RequestOutcome::kSuccess,
          RequestChromeDumpAndWait(MemoryDumpType::kExplicitlyTriggered,
          MemoryDumpLevelOfDetail::kDetailed));
          DisableTracing();
          ```
          ```
          The name of the file: android_webview/browser/metrics/memory_metrics_logger.cc
          Insertions: 2, Deletions: 3.

          @@ -27,10 +27,9 @@
          // Called once the metrics have been determined. Does the actual logging.
          void RecordMemoryMetricsImpl(
          MemoryMetricsLogger::RecordCallback done_callback,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump) {
          - if (outcome !=
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome != memory_instrumentation::mojom::RequestOutcome::kSuccess) {
          if (done_callback) {
          std::move(done_callback).Run(false);
          }
          ```
          ```
          The name of the file: fuchsia_web/webengine/browser/web_engine_memory_inspector.cc
          Insertions: 2, Deletions: 3.

          @@ -149,15 +149,14 @@
          void WebEngineMemoryInspector::OnMemoryDumpComplete(
          base::TimeTicks requested_at,
          fpromise::suspended_task task,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          memory_instrumentation::mojom::GlobalMemoryDumpPtr raw_dump) {
          DCHECK(!dump_results_);

          dump_results_ = std::make_unique<inspect::Inspector>();

          // If capture failed then there is no data to report.
          - if (outcome !=
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess ||
          + if (outcome != memory_instrumentation::mojom::RequestOutcome::kSuccess ||
          !raw_dump) {
          task.resume_task();
          return;
          ```
          ```
          The name of the file: services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
          Insertions: 19, Deletions: 21.

          @@ -121,7 +121,7 @@
          RequestGlobalMemoryDumpCallback callback) {
          // This merely strips out the |dump_guid| argument.
          auto adapter = [](RequestGlobalMemoryDumpCallback callback,
          - mojom::MemoryDumpRequestOutcome outcome, uint64_t,
          + mojom::RequestOutcome outcome, uint64_t,
          mojom::GlobalMemoryDumpPtr global_memory_dump) {
          std::move(callback).Run(outcome, std::move(global_memory_dump));
          };
          @@ -141,14 +141,14 @@
          // Error out early if process id is null to avoid confusing with global
          // dump for all processes case when pid is kNullProcessId.
          if (pid == base::kNullProcessId) {
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kNullPid, nullptr);
          + std::move(callback).Run(mojom::RequestOutcome::kNullPid, nullptr);
          return;
          }

          // This merely strips out the |dump_guid| argument; this is not relevant
          // as we are not adding to trace.
          auto adapter = [](RequestGlobalMemoryDumpForPidCallback callback,
          - mojom::MemoryDumpRequestOutcome outcome, uint64_t,
          + mojom::RequestOutcome outcome, uint64_t,
          mojom::GlobalMemoryDumpPtr global_memory_dump) {
          std::move(callback).Run(outcome, std::move(global_memory_dump));
          };
          @@ -169,7 +169,7 @@
          // This merely strips out the |dump_guid| argument; this is not relevant
          // as we are not adding to trace.
          auto adapter = [](RequestPrivateMemoryFootprintCallback callback,
          - mojom::MemoryDumpRequestOutcome outcome, uint64_t,
          + mojom::RequestOutcome outcome, uint64_t,
          mojom::GlobalMemoryDumpPtr global_memory_dump) {
          std::move(callback).Run(outcome, std::move(global_memory_dump));
          };
          @@ -190,7 +190,7 @@
          RequestGlobalMemoryDumpAndAppendToTraceCallback callback) {
          // This merely strips out the |dump_ptr| argument.
          auto adapter = [](RequestGlobalMemoryDumpAndAppendToTraceCallback callback,
          - mojom::MemoryDumpRequestOutcome outcome, uint64_t dump_guid,
          + mojom::RequestOutcome outcome, uint64_t dump_guid,
          mojom::GlobalMemoryDumpPtr) {
          std::move(callback).Run(outcome, dump_guid);
          };
          @@ -246,7 +246,7 @@
          DLOG(ERROR)
          << "Memory dump request failed due to disconnected child process "
          << process_id;
          - request->outcome = mojom::MemoryDumpRequestOutcome::kProcessUnregistered;
          + request->outcome = mojom::RequestOutcome::kProcessUnregistered;
          }
          FinalizeGlobalMemoryDumpIfAllManagersReplied();
          }
          @@ -298,7 +298,7 @@
          << base::trace_event::MemoryDumpLevelOfDetailToString(
          args.level_of_detail)
          << ") is already in the queue";
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kRedundant,
          + std::move(callback).Run(mojom::RequestOutcome::kRedundant,
          0 /* dump_guid */,
          nullptr /* global_memory_dump */);
          return;
          @@ -333,7 +333,7 @@
          DLOG(ERROR) << "Global dump request timed out waiting for "
          << request->pending_responses.size() << " requests";
          }
          - request->outcome = mojom::MemoryDumpRequestOutcome::kTimeout;
          + request->outcome = mojom::RequestOutcome::kTimeout;
          request->pending_responses.clear();

          // Callback the consumer of the service.
          @@ -422,7 +422,7 @@

          void CoordinatorImpl::OnChromeMemoryDumpResponse(
          base::ProcessId process_id,
          - mojom::MemoryDumpRequestOutcome outcome,
          + mojom::RequestOutcome outcome,
          uint64_t dump_guid,
          std::unique_ptr<base::trace_event::ProcessMemoryDump> chrome_memory_dump) {
          using ResponseType = QueuedRequest::PendingResponse::Type;
          @@ -442,7 +442,7 @@
          auto* response = &request->responses[process_id];
          response->chrome_dump = std::move(chrome_memory_dump);

          - if (outcome != mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome != mojom::RequestOutcome::kSuccess) {
          DLOG(ERROR) << "Memory dump request failed: NACK from client process";
          request->outcome = outcome;
          }
          @@ -450,11 +450,10 @@
          FinalizeGlobalMemoryDumpIfAllManagersReplied();
          }

          -void CoordinatorImpl::OnOSMemoryDumpResponse(
          - uint64_t dump_guid,
          - base::ProcessId process_id,
          - mojom::MemoryDumpRequestOutcome outcome,
          - OSMemDumpMap os_dumps) {
          +void CoordinatorImpl::OnOSMemoryDumpResponse(uint64_t dump_guid,
          + base::ProcessId process_id,
          + mojom::RequestOutcome outcome,
          + OSMemDumpMap os_dumps) {
          using ResponseType = QueuedRequest::PendingResponse::Type;
          DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
          QueuedRequest* request = GetCurrentRequest();
          @@ -471,7 +470,7 @@

          request->responses[process_id].os_dumps = std::move(os_dumps);

          - if (outcome != mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome != mojom::RequestOutcome::kSuccess) {
          DLOG(ERROR) << "Memory dump request failed: NACK from client process";
          request->outcome = outcome;
          }
          @@ -479,11 +478,10 @@
          FinalizeGlobalMemoryDumpIfAllManagersReplied();
          }

          -void CoordinatorImpl::OnOSMemoryDumpForVMRegions(
          - uint64_t dump_guid,
          - base::ProcessId process_id,
          - mojom::MemoryDumpRequestOutcome outcome,
          - OSMemDumpMap os_dumps) {
          +void CoordinatorImpl::OnOSMemoryDumpForVMRegions(uint64_t dump_guid,
          + base::ProcessId process_id,
          + mojom::RequestOutcome outcome,
          + OSMemDumpMap os_dumps) {
          DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
          auto request_it = in_progress_vm_region_requests_.find(dump_guid);
          CHECK(request_it != in_progress_vm_region_requests_.end());
          ```
          ```
          The name of the file: content/browser/devtools/protocol/tracing_handler.h
          Insertions: 1, Deletions: 1.

          @@ -118,7 +118,7 @@
          const std::set<std::string>& category_set);
          void OnMemoryDumpFinished(
          std::unique_ptr<RequestMemoryDumpCallback> callback,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          uint64_t dump_id);
          void OnFrameFromVideoConsumer(scoped_refptr<media::VideoFrame> frame);
          // Assuming that the input is a potentially incomplete string representation
          ```
          ```
          The name of the file: services/resource_coordinator/memory_instrumentation/coordinator_impl.h
          Insertions: 5, Deletions: 7.

          @@ -84,10 +84,8 @@

          private:
          using OSMemDumpMap = base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr>;
          - using RequestGlobalMemoryDumpInternalCallback =
          - base::OnceCallback<void(mojom::MemoryDumpRequestOutcome,
          - uint64_t,
          - mojom::GlobalMemoryDumpPtr)>;
          + using RequestGlobalMemoryDumpInternalCallback = base::OnceCallback<
          + void(mojom::RequestOutcome, uint64_t, mojom::GlobalMemoryDumpPtr)>;
          friend class CoordinatorImplTest; // For testing
          FRIEND_TEST_ALL_PREFIXES(CoordinatorImplTest,
          DumpsAreAddedToTraceWhenRequested);
          @@ -115,20 +113,20 @@
          // Callback of RequestChromeMemoryDump.
          void OnChromeMemoryDumpResponse(
          base::ProcessId process_id,
          - mojom::MemoryDumpRequestOutcome outcome,
          + mojom::RequestOutcome outcome,
          uint64_t dump_guid,
          std::unique_ptr<base::trace_event::ProcessMemoryDump> chrome_memory_dump);

          // Callback of RequestOSMemoryDump.
          void OnOSMemoryDumpResponse(uint64_t dump_guid,
          base::ProcessId process_id,
          - mojom::MemoryDumpRequestOutcome outcome,
          + mojom::RequestOutcome outcome,
          OSMemDumpMap);

          // Callback of RequestOSMemoryDumpForVmRegions.
          void OnOSMemoryDumpForVMRegions(uint64_t dump_guid,
          base::ProcessId process_id,
          - mojom::MemoryDumpRequestOutcome outcome,
          + mojom::RequestOutcome outcome,
          OSMemDumpMap);

          void FinalizeVmRegionDumpIfAllManagersReplied(uint64_t dump_guid);
          ```
          ```
          The name of the file: services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
          Insertions: 80, Deletions: 91.

          @@ -174,7 +174,7 @@
          mad->AddScalar(MemoryAllocatorDump::kNameSize,
          MemoryAllocatorDump::kUnitsBytes, 1024);

          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, std::move(pmd));
          });

          @@ -184,7 +184,7 @@
          const std::vector<base::ProcessId> pids,
          RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          }
          @@ -221,10 +221,9 @@
          class MockGlobalMemoryDumpCallback {
          public:
          MockGlobalMemoryDumpCallback() = default;
          - MOCK_METHOD2(OnCall,
          - void(mojom::MemoryDumpRequestOutcome, GlobalMemoryDump*));
          + MOCK_METHOD2(OnCall, void(mojom::RequestOutcome, GlobalMemoryDump*));

          - void Run(mojom::MemoryDumpRequestOutcome outcome, GlobalMemoryDumpPtr ptr) {
          + void Run(mojom::RequestOutcome outcome, GlobalMemoryDumpPtr ptr) {
          OnCall(outcome, ptr.get());
          }

          @@ -237,9 +236,9 @@
          class MockGlobalMemoryDumpAndAppendToTraceCallback {
          public:
          MockGlobalMemoryDumpAndAppendToTraceCallback() = default;
          - MOCK_METHOD2(OnCall, void(mojom::MemoryDumpRequestOutcome, uint64_t));
          + MOCK_METHOD2(OnCall, void(mojom::RequestOutcome, uint64_t));

          - void Run(mojom::MemoryDumpRequestOutcome outcome, uint64_t dump_guid) {
          + void Run(mojom::RequestOutcome outcome, uint64_t dump_guid) {
          OnCall(outcome, dump_guid);
          }

          @@ -292,8 +291,7 @@
          // Tests that the global dump is acked even in absence of clients.
          TEST_F(CoordinatorImplTest, NoClients) {
          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess, NotNull()));
          + EXPECT_CALL(callback, OnCall(mojom::RequestOutcome::kSuccess, NotNull()));
          RequestGlobalMemoryDump(callback.Get());
          }

          @@ -309,8 +307,7 @@
          EXPECT_CALL(client_process_2, RequestChromeMemoryDumpMock(_, _)).Times(1);

          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess, NotNull()))
          + EXPECT_CALL(callback, OnCall(mojom::RequestOutcome::kSuccess, NotNull()))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));
          RequestGlobalMemoryDump(callback.Get());
          run_loop.Run();
          @@ -341,7 +338,7 @@
          task_environment->FastForwardBy(base::Milliseconds(10));
          MemoryDumpArgs dump_args{MemoryDumpLevelOfDetail::kDetailed};
          auto pmd = std::make_unique<ProcessMemoryDump>(dump_args);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, std::move(pmd));
          });

          @@ -352,21 +349,19 @@
          // increasing.
          base::TimeTicks before = base::TimeTicks::Now();
          base::TimeTicks first_dump_time;
          - EXPECT_CALL(callback1,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess, NotNull()))
          - .WillOnce([&](mojom::MemoryDumpRequestOutcome outcome,
          - GlobalMemoryDump* global_dump) {
          - EXPECT_LE(before, global_dump->start_time);
          - first_dump_time = global_dump->start_time;
          - });
          - EXPECT_CALL(callback2,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess, NotNull()))
          - .WillOnce([&](mojom::MemoryDumpRequestOutcome outcome,
          - GlobalMemoryDump* global_dump) {
          - EXPECT_LT(before, global_dump->start_time);
          - EXPECT_LT(first_dump_time, global_dump->start_time);
          - run_loop.Quit();
          - });
          + EXPECT_CALL(callback1, OnCall(mojom::RequestOutcome::kSuccess, NotNull()))
          + .WillOnce(
          + [&](mojom::RequestOutcome outcome, GlobalMemoryDump* global_dump) {
          + EXPECT_LE(before, global_dump->start_time);
          + first_dump_time = global_dump->start_time;
          + });
          + EXPECT_CALL(callback2, OnCall(mojom::RequestOutcome::kSuccess, NotNull()))
          + .WillOnce(
          + [&](mojom::RequestOutcome outcome, GlobalMemoryDump* global_dump) {
          + EXPECT_LT(before, global_dump->start_time);
          + EXPECT_LT(first_dump_time, global_dump->start_time);
          + run_loop.Quit();
          + });
          RequestGlobalMemoryDump(callback1.Get());
          RequestGlobalMemoryDump(callback2.Get());
          run_loop.Run();
          @@ -384,13 +379,13 @@
          MockClientProcess::RequestChromeMemoryDumpCallback& callback) {
          MemoryDumpArgs dump_args{MemoryDumpLevelOfDetail::kDetailed};
          auto pmd = std::make_unique<ProcessMemoryDump>(dump_args);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, std::move(pmd));
          });

          MockGlobalMemoryDumpCallback callback;
          EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess,
          + OnCall(mojom::RequestOutcome::kSuccess,
          Pointee(Field(&mojom::GlobalMemoryDump::process_dumps,
          IsEmpty()))))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));
          @@ -410,13 +405,13 @@
          const std::vector<base::ProcessId>& pids,
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });

          MockGlobalMemoryDumpCallback callback;
          EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess,
          + OnCall(mojom::RequestOutcome::kSuccess,
          Pointee(Field(&mojom::GlobalMemoryDump::process_dumps,
          IsEmpty()))))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));
          @@ -445,7 +440,7 @@

          MockGlobalMemoryDumpCallback callback;
          EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kTimeout,
          + OnCall(mojom::RequestOutcome::kTimeout,
          Pointee(Field(&mojom::GlobalMemoryDump::process_dumps,
          IsEmpty()))))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));
          @@ -483,7 +478,7 @@
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[kBrowserPid] = FillRawOSDump(kBrowserPid);
          results[kRendererPid] = FillRawOSDump(kRendererPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(renderer_client, RequestOSMemoryDumpMock(_, _, _, _)).Times(0);
          @@ -495,7 +490,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[0] = FillRawOSDump(kBrowserPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(renderer_client, RequestOSMemoryDumpMock(_, _, Contains(0), _))
          @@ -505,7 +500,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[0] = FillRawOSDump(kRendererPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
          @@ -521,8 +516,8 @@
          });

          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(callback, OnCall(mojom::MemoryDumpRequestOutcome::kTimeout, _))
          - .WillOnce([&run_loop](mojom::MemoryDumpRequestOutcome outcome,
          + EXPECT_CALL(callback, OnCall(mojom::RequestOutcome::kTimeout, _))
          + .WillOnce([&run_loop](mojom::RequestOutcome outcome,
          GlobalMemoryDump* global_dump) {
          EXPECT_EQ(1U, global_dump->process_dumps.size());
          run_loop.Quit();
          @@ -553,7 +548,7 @@
          const MemoryDumpRequestArgs& args,
          MockClientProcess::RequestChromeMemoryDumpCallback& callback) {
          client_process_2.reset();
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, nullptr);
          });
          ON_CALL(*client_process_2, RequestChromeMemoryDumpMock(_, _))
          @@ -562,14 +557,13 @@
          const MemoryDumpRequestArgs& args,
          MockClientProcess::RequestChromeMemoryDumpCallback& callback) {
          client_process_1.reset();
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, nullptr);
          });

          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(
          - callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kProcessUnregistered, NotNull()))
          + EXPECT_CALL(callback,
          + OnCall(mojom::RequestOutcome::kProcessUnregistered, NotNull()))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));
          RequestGlobalMemoryDump(callback.Get());
          run_loop.Run();
          @@ -591,14 +585,13 @@
          // The dtor here will cause mojo to post an UnregisterClient call to
          // the coordinator.
          client_process.reset();
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, nullptr);
          });

          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(
          - callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kProcessUnregistered, NotNull()))
          + EXPECT_CALL(callback,
          + OnCall(mojom::RequestOutcome::kProcessUnregistered, NotNull()))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));
          RequestGlobalMemoryDump(callback.Get());
          run_loop.Run();
          @@ -648,8 +641,8 @@
          pmd->CreateAllocatorDump("partition_alloc/partitions/not_ignored_2")
          ->AddScalar(size, bytes, 2 * kB);

          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          - args.dump_guid, std::move(pmd));
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess, args.dump_guid,
          + std::move(pmd));
          });
          EXPECT_CALL(renderer_client, RequestChromeMemoryDumpMock(_, _))
          .WillOnce(
          @@ -661,7 +654,7 @@
          "malloc", base::trace_event::MemoryAllocatorDumpGuid(2));
          mad->AddScalar(MemoryAllocatorDump::kNameSize,
          MemoryAllocatorDump::kUnitsBytes, 1024 * 2);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, std::move(pmd));
          });
          #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
          @@ -680,7 +673,7 @@
          results[2]->platform_private_footprint =
          mojom::PlatformPrivateFootprint::New();
          results[2]->resident_set_kb = 2;
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(renderer_client, RequestOSMemoryDumpMock(_, _, _, _)).Times(0);
          @@ -695,7 +688,7 @@
          results[0]->platform_private_footprint =
          mojom::PlatformPrivateFootprint::New();
          results[0]->resident_set_kb = 1;
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(renderer_client, RequestOSMemoryDumpMock(_, _, Contains(0), _))
          @@ -708,15 +701,14 @@
          results[0]->platform_private_footprint =
          mojom::PlatformPrivateFootprint::New();
          results[0]->resident_set_kb = 2;
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)

          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess, NotNull()))
          - .WillOnce([&run_loop](mojom::MemoryDumpRequestOutcome outcome,
          + EXPECT_CALL(callback, OnCall(mojom::RequestOutcome::kSuccess, NotNull()))
          + .WillOnce([&run_loop](mojom::RequestOutcome outcome,
          GlobalMemoryDump* global_dump) {
          EXPECT_EQ(2U, global_dump->process_dumps.size());
          mojom::ProcessMemoryDumpPtr browser_dump = nullptr;
          @@ -767,7 +759,7 @@
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[kBrowserPid] = FillRawOSDump(kBrowserPid);
          results[kRendererPid] = FillRawOSDump(kRendererPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(renderer_client, RequestOSMemoryDumpMock(_, _, _, _)).Times(0);
          @@ -779,7 +771,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[0] = FillRawOSDump(kBrowserPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(renderer_client, RequestOSMemoryDumpMock(_, _, Contains(0), _))
          @@ -789,7 +781,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[0] = FillRawOSDump(kRendererPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
          @@ -849,13 +841,13 @@
          MockClientProcess::RequestChromeMemoryDumpCallback& callback) {
          MemoryDumpArgs dump_args{MemoryDumpLevelOfDetail::kDetailed};
          auto pmd = std::make_unique<ProcessMemoryDump>(dump_args);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, std::move(pmd));
          });

          MockGlobalMemoryDumpCallback callback;
          EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess,
          + OnCall(mojom::RequestOutcome::kSuccess,
          Pointee(Field(&mojom::GlobalMemoryDump::process_dumps,
          IsEmpty()))))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));
          @@ -891,13 +883,12 @@
          MockClientProcess::RequestChromeMemoryDumpCallback& callback) {
          MemoryDumpArgs dump_args{MemoryDumpLevelOfDetail::kDetailed};
          auto pmd = std::make_unique<ProcessMemoryDump>(dump_args);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, std::move(pmd));
          });

          MockGlobalMemoryDumpAndAppendToTraceCallback callback;
          - EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess, Ne(0ul)))
          + EXPECT_CALL(callback, OnCall(mojom::RequestOutcome::kSuccess, Ne(0ul)))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));

          base::trace_event::TraceConfig trace_config(
          @@ -937,7 +928,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[kBrowserPid] = FillRawOSDump(kBrowserPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          })
          .WillOnce([](mojom::MemoryMapOption,
          @@ -946,7 +937,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[kRendererPid] = FillRawOSDump(kRendererPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          })
          .WillOnce([](mojom::MemoryMapOption,
          @@ -955,7 +946,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[kGpuPid] = FillRawOSDump(kGpuPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          #else
          @@ -966,7 +957,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[0] = FillRawOSDump(kBrowserPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(client_process_2, RequestOSMemoryDumpMock(_, _, Contains(0), _))
          @@ -976,7 +967,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[0] = FillRawOSDump(kRendererPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          EXPECT_CALL(client_process_3, RequestOSMemoryDumpMock(_, _, Contains(0), _))
          @@ -986,7 +977,7 @@
          MockClientProcess::RequestOSMemoryDumpCallback& callback) {
          base::flat_map<base::ProcessId, mojom::RawOSMemDumpPtr> results;
          results[0] = FillRawOSDump(kGpuPid);
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
          @@ -994,19 +985,18 @@
          base::RunLoop run_loop;

          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kSuccess, Ne(nullptr)))
          - .WillOnce([](mojom::MemoryDumpRequestOutcome outcome,
          - GlobalMemoryDump* global_dump) {
          - EXPECT_EQ(1U, global_dump->process_dumps.size());
          - EXPECT_EQ(global_dump->process_dumps[0]->pid, kBrowserPid);
          - })
          - .WillOnce([](mojom::MemoryDumpRequestOutcome outcome,
          - GlobalMemoryDump* global_dump) {
          - EXPECT_EQ(1U, global_dump->process_dumps.size());
          - EXPECT_EQ(global_dump->process_dumps[0]->pid, kRendererPid);
          - })
          - .WillOnce([&run_loop](mojom::MemoryDumpRequestOutcome outcome,
          + EXPECT_CALL(callback, OnCall(mojom::RequestOutcome::kSuccess, Ne(nullptr)))
          + .WillOnce(
          + [](mojom::RequestOutcome outcome, GlobalMemoryDump* global_dump) {
          + EXPECT_EQ(1U, global_dump->process_dumps.size());
          + EXPECT_EQ(global_dump->process_dumps[0]->pid, kBrowserPid);
          + })
          + .WillOnce(
          + [](mojom::RequestOutcome outcome, GlobalMemoryDump* global_dump) {
          + EXPECT_EQ(1U, global_dump->process_dumps.size());
          + EXPECT_EQ(global_dump->process_dumps[0]->pid, kRendererPid);
          + })
          + .WillOnce([&run_loop](mojom::RequestOutcome outcome,
          GlobalMemoryDump* global_dump) {
          EXPECT_EQ(1U, global_dump->process_dumps.size());
          EXPECT_EQ(global_dump->process_dumps[0]->pid, kGpuPid);
          @@ -1026,9 +1016,8 @@
          base::RunLoop run_loop;

          MockGlobalMemoryDumpCallback callback;
          - EXPECT_CALL(
          - callback,
          - OnCall(mojom::MemoryDumpRequestOutcome::kProcessNotFound, nullptr))
          + EXPECT_CALL(callback,
          + OnCall(mojom::RequestOutcome::kProcessNotFound, nullptr))
          .WillOnce(RunOnceClosure(run_loop.QuitClosure()));

          RequestGlobalMemoryDumpForPid(2, {}, callback.Get());
          @@ -1072,7 +1061,7 @@
          pmd->CreateAllocatorDump("partition_alloc/partitions/2")
          ->AddScalar(size, bytes, 2 * kB);

          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          args.dump_guid, std::move(pmd));
          });
          #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
          @@ -1086,7 +1075,7 @@
          results[1]->resident_set_kb = 1;
          results[1]->platform_private_footprint =
          mojom::PlatformPrivateFootprint::New();
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          #else
          @@ -1100,12 +1089,12 @@
          results[0]->platform_private_footprint =
          mojom::PlatformPrivateFootprint::New();
          results[0]->resident_set_kb = 1;
          - std::move(callback).Run(mojom::MemoryDumpRequestOutcome::kSuccess,
          + std::move(callback).Run(mojom::RequestOutcome::kSuccess,
          std::move(results));
          });
          #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)

          - base::test::TestFuture<mojom::MemoryDumpRequestOutcome,
          + base::test::TestFuture<mojom::RequestOutcome,
          memory_instrumentation::mojom::GlobalMemoryDumpPtr>
          result;
          RequestGlobalMemoryDump(MemoryDumpType::kSummaryOnly,
          @@ -1114,8 +1103,8 @@
          result.GetCallback());

          // Expect that the dump request succeeds.
          - ASSERT_EQ(mojom::MemoryDumpRequestOutcome::kSuccess,
          - std::get<mojom::MemoryDumpRequestOutcome>(result.Get()));
          + ASSERT_EQ(mojom::RequestOutcome::kSuccess,
          + std::get<mojom::RequestOutcome>(result.Get()));

          // Verify that the dump has a single "partition_alloc" top-level node, and
          // that the top level dump has children.
          ```
          ```
          The name of the file: chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
          Insertions: 14, Deletions: 14.

          @@ -720,7 +720,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          std::vector<MetricMap> expected_entries;
          @@ -759,7 +759,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          std::vector<MetricMap> expected_entries;
          @@ -796,7 +796,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          CheckMemoryUkmEntryMetrics(entries_metrics);
          @@ -828,7 +828,7 @@
          }
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));
          }

          @@ -848,7 +848,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kTimeout,
          + memory_instrumentation::mojom::RequestOutcome::kTimeout,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          // Should not record any metrics since the memory dump failed, and don't
          @@ -871,7 +871,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          auto entries = test_ukm_recorder_.GetEntriesByName(UkmEntry::kEntryName);
          @@ -926,7 +926,7 @@
          kTestRendererPid201, test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          auto entries = test_ukm_recorder_.GetEntriesByName(UkmEntry::kEntryName);
          @@ -962,7 +962,7 @@
          kTestRendererPid202, test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          // Check that if there are two URLs, neither is emitted.
          @@ -997,7 +997,7 @@
          kTestRendererPid203, test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          auto entries = test_ukm_recorder_.GetEntriesByName(UkmEntry::kEntryName);
          @@ -1091,7 +1091,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          // Check that the expected values have been emitted to histograms.
          @@ -1179,7 +1179,7 @@
          kTestRendererPid201, test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          // Histograms should only be emitted when measuring all processes.
          @@ -1204,7 +1204,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          // Check that the expected values have been emitted to histograms.
          @@ -1232,7 +1232,7 @@
          base::MakeRefCounted<ProcessMemoryMetricsEmitterFake>(test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          entries = test_ukm_recorder_.GetEntriesByName(
          @@ -1261,7 +1261,7 @@
          kTestRendererPid201, test_ukm_recorder_);
          emitter->ReceivedMemoryDump(
          emitter->GetProcessToPageInfoMap(graph()),
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          + memory_instrumentation::mojom::RequestOutcome::kSuccess,
          GlobalMemoryDump::MoveFrom(std::move(global_dump)));

          // Per-tab UKM's should only be emitted when measuring all processes.
          ```
          ```
          The name of the file: components/no_state_prefetch/browser/no_state_prefetch_contents.cc
          Insertions: 2, Deletions: 3.

          @@ -571,10 +571,9 @@
          }

          void NoStatePrefetchContents::DidGetMemoryUsage(
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> global_dump) {
          - if (outcome !=
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess) {
          + if (outcome != memory_instrumentation::mojom::RequestOutcome::kSuccess) {
          return;
          }

          ```
          ```
          The name of the file: chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
          Insertions: 4, Deletions: 6.

          @@ -95,12 +95,11 @@

          void RequestGlobalDumpCallback(
          base::OnceClosure quit_closure,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          uint64_t) {
          base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
          FROM_HERE, std::move(quit_closure));
          - ASSERT_EQ(memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          - outcome);
          + ASSERT_EQ(memory_instrumentation::mojom::RequestOutcome::kSuccess, outcome);
          }

          void OnStartTracingDoneCallback(
          @@ -129,10 +128,9 @@

          void ReceivedMemoryDump(
          absl::flat_hash_map<base::ProcessId, ProcessInfo> process_infos,
          - memory_instrumentation::mojom::MemoryDumpRequestOutcome outcome,
          + memory_instrumentation::mojom::RequestOutcome outcome,
          std::unique_ptr<GlobalMemoryDump> ptr) override {
          - EXPECT_EQ(memory_instrumentation::mojom::MemoryDumpRequestOutcome::kSuccess,
          - outcome);
          + EXPECT_EQ(memory_instrumentation::mojom::RequestOutcome::kSuccess, outcome);
          ProcessMemoryMetricsEmitter::ReceivedMemoryDump(std::move(process_infos),
          outcome, std::move(ptr));
          std::move(quit_closure_).Run();
          ```
          ```
          The name of the file: chrome/browser/memory_details.h
          Insertions: 1, Deletions: 2.

          @@ -164,8 +164,7 @@
          // `outcome` is the outcome of requesting the memory dump, or nullopt if the
          // memory instrumentation service is not available.
          void DidReceiveMemoryDump(
          - std::optional<memory_instrumentation::mojom::MemoryDumpRequestOutcome>
          - outcome,
          + std::optional<memory_instrumentation::mojom::RequestOutcome> outcome,
          std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump);

          std::vector<ProcessData> process_data_;
          ```

          Change information

          Commit message:
          [memory] Replace bool success with MemoryDumpRequestOutcome enum.

          The Memory.MemoryDumpSuccess histogram shows that global memory dumps
          fail ~1% of the time. To diagnose these failures, this CL replaces
          boolean "success" flags in the memory instrumentation API with a
          `MemoryDumpRequestOutcome` enum, which provides detailed failure
          reasons.

          This new outcome is reported to the `Memory.MemoryDumpOutcome`
          histogram, replacing the old boolean metric.

          Also:

          The callback for
          base::trace_event::MemoryDumpManager::CreateProcessDump() is
          updated to receive an enum "outcome" instead of a boolean. Since an
          in-process dump cannot currently fail, the new outcome enum only
          contains a `kSuccess` value. In the future, we could remove this enum
          argument completely, but we keep in for now in case our ongoing
          investigations reveal failure modes that would be relevant to report to
          the caller.

          The `failed_memory_dump_count` member in
          memory_instrumentation::QueuedRequest is replaced with an `outcome`
          member. The count wasn't used before (only whether it was zero or
          non-zero mattered). Now, `outcome` is `kSuccess` in situations where
          the count was zero before, and provides more details about what went
          wrong in situations where the count was non-zero before.

          Use base::test::TestFuture to simplify tests that had to be modified
          to support the new enum introduced in this CL.

          OBSOLETE_HISTOGRAM[Memory.MemoryDumpSuccess]=Replaced with the more detailed Memory.MemoryDumpOutcome.
          Bug: 450929521
          Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
          Reviewed-by: Alex Moshchuk <ale...@chromium.org>
          Reviewed-by: Nate Fischer <ntf...@chromium.org>
          Commit-Queue: Francois Pierre Doray <fdo...@chromium.org>
          Reviewed-by: David Song <winter...@google.com>
          Owners-Override: Nico Weber <tha...@chromium.org>
          Reviewed-by: Nico Weber <tha...@chromium.org>
          Reviewed-by: Joe Mason <joenot...@google.com>
          Cr-Commit-Position: refs/heads/main@{#1531746}
          Files:
          • M android_webview/browser/metrics/memory_metrics_logger.cc
          • M base/trace_event/memory_dump_manager.cc
          • M base/trace_event/memory_dump_manager_unittest.cc
          • M base/trace_event/memory_dump_request_args.h
          • M chrome/browser/DEPS
          • M chrome/browser/autocomplete/autocomplete_browsertest.cc
          • M chrome/browser/memory_details.cc
          • M chrome/browser/memory_details.h
          • M chrome/browser/metrics/process_memory_metrics_emitter.cc
          • M chrome/browser/metrics/process_memory_metrics_emitter.h
          • M chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
          • M chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
          • M chrome/browser/task_manager/sampling/task_manager_impl.cc
          • M chrome/browser/task_manager/sampling/task_manager_impl.h
          • M chrome/test/base/memory_tracing_browsertest.cc
          • M components/heap_profiling/multi_process/supervisor.cc
          • M components/no_state_prefetch/browser/no_state_prefetch_contents.cc
          • M components/no_state_prefetch/browser/no_state_prefetch_contents.h
          • M components/performance_manager/resource_attribution/memory_measurement_delegate.cc
          • M content/browser/devtools/protocol/tracing_handler.cc
          • M content/browser/devtools/protocol/tracing_handler.h
          • M content/browser/tracing/memory_instrumentation_browsertest.cc
          • M content/browser/tracing/memory_tracing_browsertest.cc
          • M fuchsia_web/webengine/browser/web_engine_memory_inspector.cc
          • M fuchsia_web/webengine/browser/web_engine_memory_inspector.h
          • M services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
          • M services/resource_coordinator/memory_instrumentation/coordinator_impl.h
          • M services/resource_coordinator/memory_instrumentation/coordinator_impl_unittest.cc
          • M services/resource_coordinator/memory_instrumentation/queued_request.h
          • M services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.cc
          • M services/resource_coordinator/memory_instrumentation/queued_request_dispatcher.h
          • M services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.cc
          • M services/resource_coordinator/public/cpp/memory_instrumentation/client_process_impl.h
          • M services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.cc
          • M services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h
          • M services/resource_coordinator/public/cpp/memory_instrumentation/tracing_integration_unittest.cc
          • M services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom
          • M third_party/blink/renderer/core/exported/web_media_player_impl_unittest.cc
          • M tools/metrics/histograms/metadata/memory/enums.xml
          • M tools/metrics/histograms/metadata/memory/histograms.xml
          Change size: XL
          Delta: 40 files changed, 601 insertions(+), 411 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Nate Fischer, +1 by Nico Weber, +1 by David Song, +1 by Alex Moshchuk, +1 by Joe Mason
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I28bad48931a80792a66b5ac9701f0ca88fae4832
          Gerrit-Change-Number: 7029767
          Gerrit-PatchSet: 17
          Gerrit-Owner: Francois Pierre Doray <fdo...@chromium.org>
          Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: David Song <winter...@google.com>
          Gerrit-Reviewer: Francois Pierre Doray <fdo...@chromium.org>
          Gerrit-Reviewer: Joe Mason <joenot...@google.com>
          Gerrit-Reviewer: Nate Fischer <ntf...@chromium.org>
          Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages