Commit 07eded85 authored by Piotr Pawliczek's avatar Piotr Pawliczek Committed by Chromium LUCI CQ

Logging info about print servers loaded from policies - fix

After last modifications, the information about number of print servers
loaded from policies is not reported correctly. This patch fixes this.

BUG=none
TEST=tested on my kappa device

Change-Id: I0bcbd3087393d48f958c8dba2cfaca301e9593a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628654
Auto-Submit: Piotr Pawliczek <pawliczek@chromium.org>
Commit-Queue: Luum Habtemariam <luum@chromium.org>
Reviewed-by: default avatarLuum Habtemariam <luum@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843618}
parent 3154c146
......@@ -102,6 +102,15 @@ class PrintServersManagerImpl : public PrintServersManager {
if (!is_complete) {
return;
}
// Create an entry in the device log.
if (is_complete) {
PRINTER_LOG(EVENT) << "The list of print servers has been completed. "
<< "Number of print servers: " << print_servers.size();
if (!print_servers.empty()) {
base::UmaHistogramCounts1000("Printing.PrintServers.ServersToQuery",
print_servers.size());
}
}
print_servers_ = std::map<std::string, PrintServer>();
std::vector<PrintServer> print_servers_list;
......
......@@ -66,15 +66,6 @@ class ServerPrintersProviderImpl
void OnServersChanged(bool servers_are_complete,
const std::map<GURL, PrintServer>& servers) override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Create an entry in the device log.
if (servers_are_complete) {
PRINTER_LOG(EVENT) << "The list of print servers has been completed. "
<< "Number of print servers: " << servers.size();
if (!servers.empty()) {
base::UmaHistogramCounts1000("Printing.PrintServers.ServersToQuery",
servers.size());
}
}
// Save previous state.
const bool previous_complete = IsComplete();
// Initialize new state.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment