blob: fe14b449a5530383c581b5ca384b28e8c5d0e5e2 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "android_webview/browser/aw_variations_service_client.h"
#include "android_webview/common/aw_channel.h"
#include "base/bind.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
using version_info::Channel;
namespace android_webview {
namespace {
// Gets the version number to use for variations seed simulation. Must be called
// on a thread where IO is allowed.
base::Version GetVersionForSimulation() {
base::AssertBlockingAllowed();
return version_info::GetVersion();
}
} // namespace
AwVariationsServiceClient::AwVariationsServiceClient() {}
AwVariationsServiceClient::~AwVariationsServiceClient() {}
std::string AwVariationsServiceClient::GetApplicationLocale() {
return std::string();
}
base::Callback<base::Version(void)>
AwVariationsServiceClient::GetVersionForSimulationCallback() {
return base::BindRepeating(&GetVersionForSimulation);
}
scoped_refptr<network::SharedURLLoaderFactory>
AwVariationsServiceClient::GetURLLoaderFactory() {
return nullptr;
}
network_time::NetworkTimeTracker*
AwVariationsServiceClient::GetNetworkTimeTracker() {
return nullptr;
}
Channel AwVariationsServiceClient::GetChannel() {
return android_webview::GetChannel();
}
bool AwVariationsServiceClient::GetSupportsPermanentConsistency() {
return false;
}
bool AwVariationsServiceClient::OverridesRestrictParameter(
std::string* parameter) {
return false;
}
} // namespace android_webview