Migrate print preview handler methods to ash::LocalPrinter [chromium/src : main]

0 views
Skip to first unread message

Qijiang Fan (Gerrit)

unread,
Mar 17, 2026, 3:10:28 AMMar 17
to AyeAye, print-rev...@chromium.org, print-revi...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, cros-print...@google.com

Qijiang Fan abandoned this change.

View Change

Abandoned

Qijiang Fan abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: abandon
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0e833f5827cd2fc493d5f00f9c5090e2c0dc6761
Gerrit-Change-Number: 7665107
Gerrit-PatchSet: 2
Gerrit-Owner: Qijiang Fan <f...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Qijiang Fan (Gerrit)

unread,
Mar 17, 2026, 7:17:33 PMMar 17
to Hidehiko Abe, Georg Neis, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
Attention needed from Georg Neis and Hidehiko Abe

Qijiang Fan added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Qijiang Fan . resolved

amd64-generic failures are unrelated (another wip bug by gardeners)

Open in Gerrit

Related details

Attention is currently required from:
  • Georg Neis
  • Hidehiko Abe
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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
Gerrit-Change-Number: 7666008
Gerrit-PatchSet: 3
Gerrit-Owner: Qijiang Fan <f...@chromium.org>
Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
Gerrit-Attention: Georg Neis <ne...@chromium.org>
Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
Gerrit-Comment-Date: Tue, 17 Mar 2026 23:16:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Georg Neis (Gerrit)

unread,
Mar 17, 2026, 10:23:20 PMMar 17
to Qijiang Fan, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
Attention needed from Hidehiko Abe and Qijiang Fan

Georg Neis added 16 comments

Patchset-level comments
Georg Neis . resolved

Haven't looked at the tests yet.

Commit Message
Line 15, Patchset 3 (Latest): `ash::LocalPrinter` and implementing them in `ash::LocalPrinterImpl`.
Georg Neis . unresolved

You're also adding `GetPrinter` there, but it doesn't directly come from crosapi. Could you explain in the commit message?

File chrome/browser/ash/printing/fake_local_printer.h
Line 24, Patchset 3 (Latest): // Guest users are not supported for all functions.
Georg Neis . unresolved

This comment doesn't make much sense here.

On the other hand, why not mention that all methods just crash immediately? Maybe as a comment on the class in line 16.

Line 23, Patchset 3 (Latest): // LocalPrinter override:
Georg Neis . unresolved

overrides

File chrome/browser/ash/printing/fake_local_printer.cc
Line 9, Patchset 3 (Latest):#include <vector>
Georg Neis . unresolved

You can delete these includes.

File chrome/browser/ash/printing/local_printer_impl.h
Line 36, Patchset 3 (Latest): GetPrinterCallback callback) override;
Georg Neis . unresolved

Please return the result directly (removing the callback parameter).

File chrome/browser/ash/printing/local_printer_impl.cc
Line 244, Patchset 3 (Latest): ash::CupsPrintersManagerFactory::GetForBrowserContext(context);
Georg Neis . unresolved

In some functions you have a DCHECK(printers_manager) at this point. In some you have a CHECK. Here you don't have either. Let's be consistent.

Line 292, Patchset 3 (Latest): ash::BrowserContextHelper::Get()->GetBrowserContextByAccountId(
accountId));
Georg Neis . unresolved

Let's do this only once (line 279).

File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
Line 159, Patchset 3 (Latest): ipp_client_info_calculator_;
Georg Neis . unresolved

How important is it that this gets created lazily?

Line 135, Patchset 3 (Latest): void GetUsernamePerPolicy(AshJobSettingsCallback callback,
Georg Neis . unresolved

At least the first part of the comment is no longer true for GetUsernamePerPolicy, and also not for GetIppClientInfoOnPrinterFetched I believe.

Line 66, Patchset 3 (Latest): // connection is unavailable.
Georg Neis . unresolved

Please update.

File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
Line 64, Patchset 3 (Latest):bool IsActiveUserAffiliated() {
Georg Neis . unresolved

Is the TODO from the original function not relevant here?

Line 96, Patchset 3 (Latest): const std::optional<std::string>& oauth_token) {
Georg Neis . unresolved

Prefer base/types/optional_ref.h.

Line 468, Patchset 3 (Parent): cros_local_printer_->GetUsernamePerPolicy(
Georg Neis . unresolved

Can we delete this function from crosapi now?

Line 505, Patchset 3 (Latest): user_manager::UserManager::Get()->GetPrimaryUser()->display_email();
Georg Neis . unresolved

Deprecated, see components/user_manager/user_manager.h

Line 508, Patchset 3 (Latest): std::move(add_profile_username_callback).Run(std::make_optional(username));
Georg Neis . unresolved

nit: redundant

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
  • Qijiang Fan
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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
    Gerrit-Change-Number: 7666008
    Gerrit-PatchSet: 3
    Gerrit-Owner: Qijiang Fan <f...@chromium.org>
    Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
    Gerrit-Attention: Qijiang Fan <f...@chromium.org>
    Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Comment-Date: Wed, 18 Mar 2026 02:22:43 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Qijiang Fan (Gerrit)

    unread,
    Mar 18, 2026, 3:24:40 AMMar 18
    to Hidehiko Abe, Georg Neis, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
    Attention needed from Georg Neis and Hidehiko Abe

    Qijiang Fan added 15 comments

    Commit Message
    Line 15, Patchset 3: `ash::LocalPrinter` and implementing them in `ash::LocalPrinterImpl`.
    Georg Neis . resolved

    You're also adding `GetPrinter` there, but it doesn't directly come from crosapi. Could you explain in the commit message?

    Qijiang Fan

    Done

    File chrome/browser/ash/printing/fake_local_printer.h
    Line 24, Patchset 3: // Guest users are not supported for all functions.
    Georg Neis . resolved

    This comment doesn't make much sense here.

    On the other hand, why not mention that all methods just crash immediately? Maybe as a comment on the class in line 16.

    Qijiang Fan

    deleted in fake. account to be revisited like all other functions.

    Line 23, Patchset 3: // LocalPrinter override:
    Georg Neis . resolved

    overrides

    Qijiang Fan

    done

    File chrome/browser/ash/printing/fake_local_printer.cc
    Line 9, Patchset 3:#include <vector>
    Georg Neis . resolved

    You can delete these includes.

    Qijiang Fan

    done

    File chrome/browser/ash/printing/local_printer_impl.h
    Line 36, Patchset 3: GetPrinterCallback callback) override;
    Georg Neis . resolved

    Please return the result directly (removing the callback parameter).

    Qijiang Fan

    done

    File chrome/browser/ash/printing/local_printer_impl.cc
    Line 244, Patchset 3: ash::CupsPrintersManagerFactory::GetForBrowserContext(context);
    Georg Neis . resolved

    In some functions you have a DCHECK(printers_manager) at this point. In some you have a CHECK. Here you don't have either. Let's be consistent.

    Qijiang Fan

    Done

    Line 292, Patchset 3: ash::BrowserContextHelper::Get()->GetBrowserContextByAccountId(
    accountId));
    Georg Neis . resolved

    Let's do this only once (line 279).

    Qijiang Fan

    done

    File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
    Line 159, Patchset 3: ipp_client_info_calculator_;
    Georg Neis . resolved

    How important is it that this gets created lazily?

    Qijiang Fan

    the key is actually to workaround interactive_ui_tests and browser_tests.

    IppClientInfoCalculator::Create() will crash on DCHECK for not being running on ChromeOS. (and the browser_tests that uses extension to print pdf didn't goes to the path that really needs ippclientinfo either)

    crosapi did the same thing

    Line 135, Patchset 3: void GetUsernamePerPolicy(AshJobSettingsCallback callback,
    Georg Neis . resolved

    At least the first part of the comment is no longer true for GetUsernamePerPolicy, and also not for GetIppClientInfoOnPrinterFetched I believe.

    Qijiang Fan

    done

    Line 66, Patchset 3: // connection is unavailable.
    Georg Neis . resolved

    Please update.

    Qijiang Fan

    done

    File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
    Line 64, Patchset 3:bool IsActiveUserAffiliated() {
    Georg Neis . resolved

    Is the TODO from the original function not relevant here?

    Qijiang Fan

    user_manager should always be there at this step.

    (previous steps calls to ash::LocalPrinter used account too)

    Line 96, Patchset 3: const std::optional<std::string>& oauth_token) {
    Georg Neis . resolved

    Prefer base/types/optional_ref.h.

    Qijiang Fan

    done

    Line 468, Patchset 3 (Parent): cros_local_printer_->GetUsernamePerPolicy(
    Georg Neis . resolved

    Can we delete this function from crosapi now?

    Qijiang Fan

    there are more to delete (funcs in this CL, some observer stuff), will be deleted together at next CL

    Line 505, Patchset 3: user_manager::UserManager::Get()->GetPrimaryUser()->display_email();
    Georg Neis . resolved

    Deprecated, see components/user_manager/user_manager.h

    Qijiang Fan

    session does not contain information for display_email

    changed to session_manager for other callers that only needs account id

    Line 508, Patchset 3: std::move(add_profile_username_callback).Run(std::make_optional(username));
    Georg Neis . resolved

    nit: redundant

    Qijiang Fan

    done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Georg Neis
    • Hidehiko Abe
    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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
      Gerrit-Change-Number: 7666008
      Gerrit-PatchSet: 6
      Gerrit-Owner: Qijiang Fan <f...@chromium.org>
      Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
      Gerrit-Attention: Georg Neis <ne...@chromium.org>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Wed, 18 Mar 2026 07:24:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Georg Neis <ne...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Georg Neis (Gerrit)

      unread,
      Mar 18, 2026, 10:40:02 PMMar 18
      to Qijiang Fan, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
      Attention needed from Hidehiko Abe and Qijiang Fan

      Georg Neis voted and added 5 comments

      Votes added by Georg Neis

      Code-Review+1

      5 comments

      Patchset-level comments
      File-level comment, Patchset 6 (Latest):
      Georg Neis . resolved

      lgtm with comments

      Commit Message
      Line 15, Patchset 3: `ash::LocalPrinter` and implementing them in `ash::LocalPrinterImpl`.
      Georg Neis . unresolved

      You're also adding `GetPrinter` there, but it doesn't directly come from crosapi. Could you explain in the commit message?

      Qijiang Fan

      Done

      Georg Neis

      I meant explaining where it comes from, as it was not in the original interface.

      File chrome/browser/ash/printing/fake_local_printer.h
      Line 24, Patchset 3: // Guest users are not supported for all functions.
      Georg Neis . unresolved

      This comment doesn't make much sense here.

      On the other hand, why not mention that all methods just crash immediately? Maybe as a comment on the class in line 16.

      Qijiang Fan

      deleted in fake. account to be revisited like all other functions.

      Georg Neis

      I still think there should be a sentence in this header saying what FakeLocalPrinter does, namely just crash in each method.

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
      Line 159, Patchset 3: ipp_client_info_calculator_;
      Georg Neis . unresolved

      How important is it that this gets created lazily?

      Qijiang Fan

      the key is actually to workaround interactive_ui_tests and browser_tests.

      IppClientInfoCalculator::Create() will crash on DCHECK for not being running on ChromeOS. (and the browser_tests that uses extension to print pdf didn't goes to the path that really needs ippclientinfo either)

      crosapi did the same thing

      Georg Neis

      I see, please add a code comment about that.

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
      Line 505, Patchset 3: user_manager::UserManager::Get()->GetPrimaryUser()->display_email();
      Georg Neis . unresolved

      Deprecated, see components/user_manager/user_manager.h

      Qijiang Fan

      session does not contain information for display_email

      changed to session_manager for other callers that only needs account id

      Georg Neis

      First get the session, then get the user via `user_manager::UserManager::Get()->FindUser(session->account_id())`.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Qijiang Fan
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
      Gerrit-Change-Number: 7666008
      Gerrit-PatchSet: 6
      Gerrit-Owner: Qijiang Fan <f...@chromium.org>
      Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
      Gerrit-Attention: Qijiang Fan <f...@chromium.org>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Thu, 19 Mar 2026 02:39:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Qijiang Fan <f...@chromium.org>
      Comment-In-Reply-To: Georg Neis <ne...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Hidehiko Abe (Gerrit)

      unread,
      Mar 23, 2026, 12:21:04 AM (11 days ago) Mar 23
      to Qijiang Fan, Georg Neis, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
      Attention needed from Qijiang Fan

      Hidehiko Abe added 12 comments

      File chrome/browser/ash/printing/local_printer_impl.cc
      Line 239, Patchset 6 (Latest): content::BrowserContext* context =
      Hidehiko Abe . unresolved

      could you avoid duplicating the code? Instead, could you move the code, i.e., at least remove the original function?

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
      Line 132, Patchset 6 (Latest): // These functions chain together, potentially calling the corresponding
      // `LocalPrinter` function, `IppClientInfoCalculator` function,
      // `user_manager`, etc., and then convert the result to a job setting, add it
      Hidehiko Abe . unresolved

      could you keep the definition of the function behavior more specific and concrete?

      Line 63, Patchset 6 (Latest): // Creates an instance suitable for testing with the `ash::LocalPrinter` and
      Hidehiko Abe . unresolved

      could you document the lifetime requirement of local_printer?

      Line 29, Patchset 6 (Latest):}
      }
      Hidehiko Abe . unresolved

      nit:
      ```
      } // namespace printing
      } // namespace ash
      ```

      Line 159, Patchset 3: ipp_client_info_calculator_;
      Georg Neis . unresolved

      How important is it that this gets created lazily?

      Qijiang Fan

      the key is actually to workaround interactive_ui_tests and browser_tests.

      IppClientInfoCalculator::Create() will crash on DCHECK for not being running on ChromeOS. (and the browser_tests that uses extension to print pdf didn't goes to the path that really needs ippclientinfo either)

      crosapi did the same thing

      Georg Neis

      I see, please add a code comment about that.

      Hidehiko Abe

      I'm confused. Should this class be instantiated only on ChromeOS platform...?

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
      Line 490, Patchset 6 (Latest): if (!user_manager::UserManager::IsInitialized() ||
      !user_manager::UserManager::Get()->IsUserLoggedIn()) {
      Hidehiko Abe . unresolved

      please check by using session_manager::SessionManager, instead.

      Line 497, Patchset 6 (Latest): Profile* profile = ProfileManager::GetPrimaryUserProfile();
      Hidehiko Abe . unresolved

      this should be covered by the GetProfilePrefs() to be used below.

      Line 504, Patchset 6 (Latest): const std::string username =
      Hidehiko Abe . unresolved

      could you move this into if block below?

      Line 506, Patchset 6 (Latest): if (profile->GetPrefs()->GetBoolean(
      Hidehiko Abe . unresolved

      please use user_manager::User::GetProfilePrefs()

      Line 555, Patchset 6 (Latest): IsActiveUserAffiliated()) {
      Hidehiko Abe . unresolved

      this checking session may be different from primary one used above at least for this code.
      Could you leave TODO to revisit here to fix the twisted code?

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
      Line 66, Patchset 6 (Latest):class TestLocalPrinter : public ash::FakeLocalPrinter {
      Hidehiko Abe . unresolved

      this test impl should be embedded in your new FakeLocalPrinter?
      In general, the behavior of the fake should be implemented in the fake class put next to the original class to avoid divergence of the behavior for variation of test cases.

      Line 124, Patchset 6 (Latest):class MockIppClientInfoCalculator
      Hidehiko Abe . unresolved

      can we avoid new gmock use?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Qijiang Fan
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
      Gerrit-Change-Number: 7666008
      Gerrit-PatchSet: 6
      Gerrit-Owner: Qijiang Fan <f...@chromium.org>
      Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
      Gerrit-Attention: Qijiang Fan <f...@chromium.org>
      Gerrit-Comment-Date: Mon, 23 Mar 2026 04:20:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Qijiang Fan (Gerrit)

      unread,
      Mar 30, 2026, 3:08:34 AM (3 days ago) Mar 30
      to Georg Neis, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
      Attention needed from Georg Neis and Hidehiko Abe

      Qijiang Fan added 17 comments

      Commit Message
      Line 15, Patchset 3: `ash::LocalPrinter` and implementing them in `ash::LocalPrinterImpl`.
      Georg Neis . resolved

      You're also adding `GetPrinter` there, but it doesn't directly come from crosapi. Could you explain in the commit message?

      Qijiang Fan

      Done

      Georg Neis

      I meant explaining where it comes from, as it was not in the original interface.

      Qijiang Fan

      Done

      File chrome/browser/ash/printing/fake_local_printer.h
      Line 24, Patchset 3: // Guest users are not supported for all functions.
      Georg Neis . resolved

      This comment doesn't make much sense here.

      On the other hand, why not mention that all methods just crash immediately? Maybe as a comment on the class in line 16.

      Qijiang Fan

      deleted in fake. account to be revisited like all other functions.

      Georg Neis

      I still think there should be a sentence in this header saying what FakeLocalPrinter does, namely just crash in each method.

      Qijiang Fan

      done

      Line 24, Patchset 3: // Guest users are not supported for all functions.
      Georg Neis . resolved

      This comment doesn't make much sense here.

      On the other hand, why not mention that all methods just crash immediately? Maybe as a comment on the class in line 16.

      Qijiang Fan

      deleted in fake. account to be revisited like all other functions.

      Georg Neis

      I still think there should be a sentence in this header saying what FakeLocalPrinter does, namely just crash in each method.

      Qijiang Fan

      Done

      File chrome/browser/ash/printing/local_printer_impl.cc
      Line 239, Patchset 6: content::BrowserContext* context =
      Hidehiko Abe . resolved

      could you avoid duplicating the code? Instead, could you move the code, i.e., at least remove the original function?

      Qijiang Fan

      like other migrations before, removal will be done at separate CLs soon confirmed without regression for a few days.

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
      Line 132, Patchset 6: // These functions chain together, potentially calling the corresponding

      // `LocalPrinter` function, `IppClientInfoCalculator` function,
      // `user_manager`, etc., and then convert the result to a job setting, add it
      Hidehiko Abe . resolved

      could you keep the definition of the function behavior more specific and concrete?

      Qijiang Fan

      Done

      Line 63, Patchset 6: // Creates an instance suitable for testing with the `ash::LocalPrinter` and
      Hidehiko Abe . resolved

      could you document the lifetime requirement of local_printer?

      Qijiang Fan

      what do you mean by document lifetime requiremnt of local_printer?

      local_printer is always there (almost persistent) after ash initialization, while LocalPrinterHandlerChromeos is only at print-ui lifecycle (very short)

      also CreateForTesting is for testing where SetUp setsup everything in correct order, and TearDown deletes them.

      Line 29, Patchset 6:}
      }
      Hidehiko Abe . resolved

      nit:
      ```
      } // namespace printing
      } // namespace ash
      ```

      Qijiang Fan

      Done

      Line 159, Patchset 3: ipp_client_info_calculator_;
      Georg Neis . resolved

      How important is it that this gets created lazily?

      Qijiang Fan

      the key is actually to workaround interactive_ui_tests and browser_tests.

      IppClientInfoCalculator::Create() will crash on DCHECK for not being running on ChromeOS. (and the browser_tests that uses extension to print pdf didn't goes to the path that really needs ippclientinfo either)

      crosapi did the same thing

      Georg Neis

      I see, please add a code comment about that.

      Hidehiko Abe

      I'm confused. Should this class be instantiated only on ChromeOS platform...?

      Qijiang Fan

      BUILDFLAG(OS_CHROMEOS) does not equal to IsRunningOnChromeOS()
      the later checks it is really running on ChromeOS. since IppClientInfoCalculator needs the ChromeOS version info

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
      Line 490, Patchset 6: if (!user_manager::UserManager::IsInitialized() ||
      !user_manager::UserManager::Get()->IsUserLoggedIn()) {
      Hidehiko Abe . resolved

      please check by using session_manager::SessionManager, instead.

      Qijiang Fan

      Done

      Line 497, Patchset 6: Profile* profile = ProfileManager::GetPrimaryUserProfile();
      Hidehiko Abe . resolved

      this should be covered by the GetProfilePrefs() to be used below.

      Qijiang Fan

      done

      Line 504, Patchset 6: const std::string username =
      Hidehiko Abe . resolved

      could you move this into if block below?

      Qijiang Fan

      done

      Line 505, Patchset 3: user_manager::UserManager::Get()->GetPrimaryUser()->display_email();
      Georg Neis . resolved

      Deprecated, see components/user_manager/user_manager.h

      Qijiang Fan

      session does not contain information for display_email

      changed to session_manager for other callers that only needs account id

      Georg Neis

      First get the session, then get the user via `user_manager::UserManager::Get()->FindUser(session->account_id())`.

      Qijiang Fan

      done

      Line 506, Patchset 6: if (profile->GetPrefs()->GetBoolean(
      Hidehiko Abe . resolved

      please use user_manager::User::GetProfilePrefs()

      Qijiang Fan

      done

      Line 555, Patchset 6: IsActiveUserAffiliated()) {
      Hidehiko Abe . resolved

      this checking session may be different from primary one used above at least for this code.
      Could you leave TODO to revisit here to fix the twisted code?

      Qijiang Fan

      Done

      Line 555, Patchset 6: IsActiveUserAffiliated()) {
      Hidehiko Abe . resolved

      this checking session may be different from primary one used above at least for this code.
      Could you leave TODO to revisit here to fix the twisted code?

      Qijiang Fan

      done

      File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
      Line 66, Patchset 6:class TestLocalPrinter : public ash::FakeLocalPrinter {
      Hidehiko Abe . resolved

      this test impl should be embedded in your new FakeLocalPrinter?
      In general, the behavior of the fake should be implemented in the fake class put next to the original class to avoid divergence of the behavior for variation of test cases.

      Qijiang Fan

      i would leave fake a NOTREACHED() for now (the same as what crosapi does) the reason is:

      • there is indeed difference of fake implementations for different tests. (some just return a hardcoded values, some have extra helper to set values, some throw errors)
      • the "parent" fake is just a stub that overrides all virtual functions so we don't need to add override for (each test's) unused functions.
      Line 124, Patchset 6:class MockIppClientInfoCalculator
      Hidehiko Abe . resolved

      can we avoid new gmock use?

      Qijiang Fan

      mock is cleaner than fake with initialized return values + call counts members.

      is mock now banned?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Georg Neis
      • Hidehiko Abe
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
        Gerrit-Change-Number: 7666008
        Gerrit-PatchSet: 8
        Gerrit-Owner: Qijiang Fan <f...@chromium.org>
        Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
        Gerrit-Attention: Georg Neis <ne...@chromium.org>
        Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Comment-Date: Mon, 30 Mar 2026 07:07:57 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Qijiang Fan <f...@chromium.org>
        Comment-In-Reply-To: Georg Neis <ne...@chromium.org>
        Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Georg Neis (Gerrit)

        unread,
        Mar 30, 2026, 3:15:25 AM (3 days ago) Mar 30
        to Qijiang Fan, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
        Attention needed from Hidehiko Abe and Qijiang Fan

        Georg Neis voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Hidehiko Abe
        • Qijiang Fan
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
          Gerrit-Change-Number: 7666008
          Gerrit-PatchSet: 8
          Gerrit-Owner: Qijiang Fan <f...@chromium.org>
          Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
          Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
          Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
          Gerrit-Attention: Qijiang Fan <f...@chromium.org>
          Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
          Gerrit-Comment-Date: Mon, 30 Mar 2026 07:15:09 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Hidehiko Abe (Gerrit)

          unread,
          Mar 30, 2026, 5:25:34 AM (3 days ago) Mar 30
          to Qijiang Fan, Georg Neis, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
          Attention needed from Qijiang Fan

          Hidehiko Abe added 6 comments

          File chrome/browser/ash/printing/local_printer_impl.cc
          Line 239, Patchset 6: content::BrowserContext* context =
          Hidehiko Abe . unresolved

          could you avoid duplicating the code? Instead, could you move the code, i.e., at least remove the original function?

          Qijiang Fan

          like other migrations before, removal will be done at separate CLs soon confirmed without regression for a few days.

          Hidehiko Abe

          Marked as unresolved.

          So, it's difficult to see what are carried...?

          File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
          Line 132, Patchset 6: // These functions chain together, potentially calling the corresponding
          // `LocalPrinter` function, `IppClientInfoCalculator` function,
          // `user_manager`, etc., and then convert the result to a job setting, add it
          Hidehiko Abe . unresolved

          could you keep the definition of the function behavior more specific and concrete?

          Qijiang Fan

          Done

          Hidehiko Abe

          I'd be more concrete.

          What do you mean by "potentially"? What is corresponding ... function? E.g. for GetUsernamePerPolicy, there's no trivially corresponding methods. Also, these are more likely implementation details. Could you comment "what is the semantics" of each function?

          Line 63, Patchset 6: // Creates an instance suitable for testing with the `ash::LocalPrinter` and
          Hidehiko Abe . unresolved

          could you document the lifetime requirement of local_printer?

          Qijiang Fan

          what do you mean by document lifetime requiremnt of local_printer?

          local_printer is always there (almost persistent) after ash initialization, while LocalPrinterHandlerChromeos is only at print-ui lifecycle (very short)

          also CreateForTesting is for testing where SetUp setsup everything in correct order, and TearDown deletes them.

          Hidehiko Abe

          Regardless of the current use, local_printer must be non-null and outlive the returned instance. Could you explicitly document in the comment?

          File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
          Line 504, Patchset 8 (Latest): user_manager::UserManager::Get()->FindUser(account)->display_email();
          Hidehiko Abe . unresolved

          could you avoid searching twice?

          File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
          Line 66, Patchset 6:class TestLocalPrinter : public ash::FakeLocalPrinter {
          Hidehiko Abe . unresolved

          this test impl should be embedded in your new FakeLocalPrinter?
          In general, the behavior of the fake should be implemented in the fake class put next to the original class to avoid divergence of the behavior for variation of test cases.

          Qijiang Fan

          i would leave fake a NOTREACHED() for now (the same as what crosapi does) the reason is:

          • there is indeed difference of fake implementations for different tests. (some just return a hardcoded values, some have extra helper to set values, some throw errors)
          • the "parent" fake is just a stub that overrides all virtual functions so we don't need to add override for (each test's) unused functions.
          Hidehiko Abe

          Marked as unresolved.

          there is indeed difference of fake implementations for different tests.

          definitely this is the reason we shouldn't have overriding in each test. The fake should "fake" the behavior of the real instance, and it shouldn't depend on the test cases. If some test would like to exercise the error situation, then fake should have an ability to mimic the "service error".

          Line 124, Patchset 6:class MockIppClientInfoCalculator
          Hidehiko Abe . unresolved

          can we avoid new gmock use?

          Qijiang Fan

          mock is cleaner than fake with initialized return values + call counts members.

          is mock now banned?

          Hidehiko Abe

          Marked as unresolved.

          As described above, mock describes the service behavior in test, which increases maintenance cost unnecessarily. Let's avoid such.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Qijiang Fan
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement is not 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
            Gerrit-Change-Number: 7666008
            Gerrit-PatchSet: 8
            Gerrit-Owner: Qijiang Fan <f...@chromium.org>
            Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
            Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
            Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
            Gerrit-Attention: Qijiang Fan <f...@chromium.org>
            Gerrit-Comment-Date: Mon, 30 Mar 2026 09:24:55 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Qijiang Fan <f...@chromium.org>
            Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Qijiang Fan (Gerrit)

            unread,
            Mar 31, 2026, 12:38:17 AM (3 days ago) Mar 31
            to Georg Neis, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
            Attention needed from Georg Neis and Hidehiko Abe

            Qijiang Fan added 5 comments

            File chrome/browser/ash/printing/local_printer_impl.cc
            Line 239, Patchset 6: content::BrowserContext* context =
            Hidehiko Abe . resolved

            could you avoid duplicating the code? Instead, could you move the code, i.e., at least remove the original function?

            Qijiang Fan

            like other migrations before, removal will be done at separate CLs soon confirmed without regression for a few days.

            Hidehiko Abe

            Marked as unresolved.

            So, it's difficult to see what are carried...?

            Qijiang Fan

            Done

            File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
            Line 132, Patchset 6: // These functions chain together, potentially calling the corresponding
            // `LocalPrinter` function, `IppClientInfoCalculator` function,
            // `user_manager`, etc., and then convert the result to a job setting, add it
            Hidehiko Abe . resolved

            could you keep the definition of the function behavior more specific and concrete?

            Qijiang Fan

            Done

            Hidehiko Abe

            I'd be more concrete.

            What do you mean by "potentially"? What is corresponding ... function? E.g. for GetUsernamePerPolicy, there's no trivially corresponding methods. Also, these are more likely implementation details. Could you comment "what is the semantics" of each function?

            Qijiang Fan

            done

            File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
            Line 504, Patchset 8: user_manager::UserManager::Get()->FindUser(account)->display_email();
            Hidehiko Abe . resolved

            could you avoid searching twice?

            Qijiang Fan

            Done

            File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
            Line 66, Patchset 6:class TestLocalPrinter : public ash::FakeLocalPrinter {
            Hidehiko Abe . resolved

            this test impl should be embedded in your new FakeLocalPrinter?
            In general, the behavior of the fake should be implemented in the fake class put next to the original class to avoid divergence of the behavior for variation of test cases.

            Qijiang Fan

            i would leave fake a NOTREACHED() for now (the same as what crosapi does) the reason is:

            • there is indeed difference of fake implementations for different tests. (some just return a hardcoded values, some have extra helper to set values, some throw errors)
            • the "parent" fake is just a stub that overrides all virtual functions so we don't need to add override for (each test's) unused functions.
            Hidehiko Abe

            Marked as unresolved.

            there is indeed difference of fake implementations for different tests.

            definitely this is the reason we shouldn't have overriding in each test. The fake should "fake" the behavior of the real instance, and it shouldn't depend on the test cases. If some test would like to exercise the error situation, then fake should have an ability to mimic the "service error".

            Qijiang Fan

            how about leaving it to the next cl. considering the size of current CL and works are needed to unify the behavior.

            TODO added in parent FakeLocalPrinter class.

            Line 124, Patchset 6:class MockIppClientInfoCalculator
            Hidehiko Abe . resolved

            can we avoid new gmock use?

            Qijiang Fan

            mock is cleaner than fake with initialized return values + call counts members.

            is mock now banned?

            Hidehiko Abe

            Marked as unresolved.

            As described above, mock describes the service behavior in test, which increases maintenance cost unnecessarily. Let's avoid such.

            Qijiang Fan

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Georg Neis
            • Hidehiko Abe
            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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
            Gerrit-Change-Number: 7666008
            Gerrit-PatchSet: 9
            Gerrit-Owner: Qijiang Fan <f...@chromium.org>
            Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
            Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
            Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
            Gerrit-Attention: Georg Neis <ne...@chromium.org>
            Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
            Gerrit-Comment-Date: Tue, 31 Mar 2026 04:37:49 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Qijiang Fan (Gerrit)

            unread,
            Mar 31, 2026, 12:41:11 AM (3 days ago) Mar 31
            to Georg Neis, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
            Attention needed from Georg Neis and Hidehiko Abe

            Qijiang Fan added 1 comment

            File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h
            Line 63, Patchset 6: // Creates an instance suitable for testing with the `ash::LocalPrinter` and
            Hidehiko Abe . resolved

            could you document the lifetime requirement of local_printer?

            Qijiang Fan

            what do you mean by document lifetime requiremnt of local_printer?

            local_printer is always there (almost persistent) after ash initialization, while LocalPrinterHandlerChromeos is only at print-ui lifecycle (very short)

            also CreateForTesting is for testing where SetUp setsup everything in correct order, and TearDown deletes them.

            Hidehiko Abe

            Regardless of the current use, local_printer must be non-null and outlive the returned instance. Could you explicitly document in the comment?

            Qijiang Fan

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Georg Neis
            • Hidehiko Abe
            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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
              Gerrit-Change-Number: 7666008
              Gerrit-PatchSet: 9
              Gerrit-Owner: Qijiang Fan <f...@chromium.org>
              Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
              Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
              Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
              Gerrit-Attention: Georg Neis <ne...@chromium.org>
              Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
              Gerrit-Comment-Date: Tue, 31 Mar 2026 04:40:35 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qijiang Fan (Gerrit)

              unread,
              Mar 31, 2026, 12:42:02 AM (3 days ago) Mar 31
              to Georg Neis, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
              Attention needed from Georg Neis and Hidehiko Abe

              Qijiang Fan voted

              Auto-Submit+1
              Commit-Queue+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Georg Neis
              • Hidehiko Abe
              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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
              Gerrit-Change-Number: 7666008
              Gerrit-PatchSet: 10
              Gerrit-Owner: Qijiang Fan <f...@chromium.org>
              Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
              Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
              Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
              Gerrit-Attention: Georg Neis <ne...@chromium.org>
              Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
              Gerrit-Comment-Date: Tue, 31 Mar 2026 04:41:33 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Qijiang Fan (Gerrit)

              unread,
              Mar 31, 2026, 12:42:03 AM (3 days ago) Mar 31
              to Georg Neis, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
              Attention needed from Georg Neis and Hidehiko Abe

              Qijiang Fan voted Auto-Submit+0

              Auto-Submit+0
              Gerrit-Comment-Date: Tue, 31 Mar 2026 04:41:38 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Georg Neis (Gerrit)

              unread,
              Mar 31, 2026, 3:30:34 AM (2 days ago) Mar 31
              to Qijiang Fan, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
              Attention needed from Hidehiko Abe and Qijiang Fan

              Georg Neis voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Hidehiko Abe
              • Qijiang Fan
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement is not 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
              Gerrit-Change-Number: 7666008
              Gerrit-PatchSet: 10
              Gerrit-Owner: Qijiang Fan <f...@chromium.org>
              Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
              Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
              Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
              Gerrit-Attention: Qijiang Fan <f...@chromium.org>
              Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
              Gerrit-Comment-Date: Tue, 31 Mar 2026 07:29:50 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Hidehiko Abe (Gerrit)

              unread,
              Apr 1, 2026, 2:37:29 PM (yesterday) Apr 1
              to Qijiang Fan, Georg Neis, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
              Attention needed from Qijiang Fan

              Hidehiko Abe voted and added 4 comments

              Votes added by Hidehiko Abe

              Code-Review+1

              4 comments

              Patchset-level comments
              File chrome/browser/ash/crosapi/local_printer_ash_unittest.cc
              Line 704, Patchset 10 (Latest):
              Hidehiko Abe . unresolved

              nit/style: just one empty line is enough.

              File chrome/browser/ash/printing/local_printer_impl_unittest.cc
              Line 324, Patchset 10 (Latest): result =
              token.has_value() ? std::make_optional(*token) : std::nullopt;
              Hidehiko Abe . unresolved

              using base::test::TestFuture will simplify the code structure, IIUC.

              File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
              Line 499, Patchset 10 (Latest): auto* profile_prefs = user ? user->GetProfilePrefs() : nullptr;
              Hidehiko Abe . unresolved

              nit: 'user' should be always available. Maybe CHECK?

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Qijiang Fan
              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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
                Gerrit-Change-Number: 7666008
                Gerrit-PatchSet: 10
                Gerrit-Owner: Qijiang Fan <f...@chromium.org>
                Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
                Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
                Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
                Gerrit-Attention: Qijiang Fan <f...@chromium.org>
                Gerrit-Comment-Date: Wed, 01 Apr 2026 18:36:51 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Qijiang Fan (Gerrit)

                unread,
                5:19 AM (10 hours ago) 5:19 AM
                to Hidehiko Abe, Georg Neis, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
                Attention needed from Georg Neis and Hidehiko Abe

                Qijiang Fan added 3 comments

                File chrome/browser/ash/crosapi/local_printer_ash_unittest.cc
                Line 704, Patchset 10:
                Hidehiko Abe . resolved

                nit/style: just one empty line is enough.

                Qijiang Fan

                Done

                File chrome/browser/ash/printing/local_printer_impl_unittest.cc

                token.has_value() ? std::make_optional(*token) : std::nullopt;
                Hidehiko Abe . resolved

                using base::test::TestFuture will simplify the code structure, IIUC.

                Qijiang Fan

                done and other usages of RunLoop too.

                but we still need to copy the value since the underlying object in optional_ref is out of scope at Take() time.

                while GetPrinters still uses std::optional&, future receiving std::optional will just have a copied value.

                File chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
                Line 499, Patchset 10: auto* profile_prefs = user ? user->GetProfilePrefs() : nullptr;
                Hidehiko Abe . resolved

                nit: 'user' should be always available. Maybe CHECK?

                Qijiang Fan

                Done

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Georg Neis
                • Hidehiko Abe
                Submit Requirements:
                  • requirement satisfiedCode-Coverage
                  • requirement 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
                  Gerrit-Change-Number: 7666008
                  Gerrit-PatchSet: 11
                  Gerrit-Owner: Qijiang Fan <f...@chromium.org>
                  Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
                  Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
                  Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
                  Gerrit-Attention: Georg Neis <ne...@chromium.org>
                  Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
                  Gerrit-Comment-Date: Thu, 02 Apr 2026 09:18:49 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Georg Neis (Gerrit)

                  unread,
                  5:21 AM (10 hours ago) 5:21 AM
                  to Qijiang Fan, Hidehiko Abe, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ffred...@chromium.org, oshima...@chromium.org, tluk+...@chromium.org, chromium-a...@chromium.org, cros-print...@google.com, extension...@chromium.org, print-rev...@chromium.org, print-revi...@chromium.org
                  Attention needed from Hidehiko Abe and Qijiang Fan

                  Georg Neis voted Code-Review+1

                  Code-Review+1
                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Hidehiko Abe
                  • Qijiang Fan
                  Submit Requirements:
                    • requirement satisfiedCode-Coverage
                    • requirement satisfiedCode-Owners
                    • requirement is not 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: I60519ad67cc3440f2f8a83ba21863e2fda012ee7
                    Gerrit-Change-Number: 7666008
                    Gerrit-PatchSet: 11
                    Gerrit-Owner: Qijiang Fan <f...@chromium.org>
                    Gerrit-Reviewer: Georg Neis <ne...@chromium.org>
                    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
                    Gerrit-Reviewer: Qijiang Fan <f...@chromium.org>
                    Gerrit-Attention: Qijiang Fan <f...@chromium.org>
                    Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
                    Gerrit-Comment-Date: Thu, 02 Apr 2026 09:21:13 +0000
                    Gerrit-HasComments: No
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy
                    Reply all
                    Reply to author
                    Forward
                    0 new messages