Commit 15597acb authored by tby's avatar tby Committed by Commit Bot

[Files ranking] Remove debug code from recurrence ranker.

Right now we're not loading saved files ranking models from disk on
dev channel, for debugging reasons. We don't need this any more, so
this CL removes the logic.

Bug: 955893
Change-Id: I4159ca99c020f422861480a4c24b39db362ce242
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2010596Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
Commit-Queue: Tony Yeoman <tby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736257}
parent 018e7a67
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.pb.h" #include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker.pb.h"
#include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_config.pb.h" #include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_config.pb.h"
#include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_util.h" #include "chrome/browser/ui/app_list/search/search_result_ranker/recurrence_ranker_util.h"
#include "chrome/common/channel_info.h"
#include "components/version_info/channel.h"
namespace app_list { namespace app_list {
namespace { namespace {
...@@ -73,14 +71,6 @@ std::unique_ptr<RecurrenceRankerProto> LoadProtoFromDisk( ...@@ -73,14 +71,6 @@ std::unique_ptr<RecurrenceRankerProto> LoadProtoFromDisk(
const std::string& model_identifier) { const std::string& model_identifier) {
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
base::BlockingType::MAY_BLOCK); base::BlockingType::MAY_BLOCK);
// TODO(crbug.com/955893): for debugging, this prevents loading models for
// zero-state files ranking on dev channel. To be removed when no longer
// necessary.
if (model_identifier == "ZeroStateGroups" &&
chrome::GetChannel() == version_info::Channel::DEV) {
return nullptr;
}
std::string proto_str; std::string proto_str;
if (!base::ReadFileToString(filepath, &proto_str)) { if (!base::ReadFileToString(filepath, &proto_str)) {
LogSerializationStatus(model_identifier, LogSerializationStatus(model_identifier,
......
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