Commit 15a10211 authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Rename VariationsClient::IsIncognito to IsOffTheRecord.

VariationsClient::IsIncognito returns true for all off-the-record
profiles and is always initialized with BrowserContext::IsOffTheRecord.
To remove misinterpretations, the function is renamed to IsOffTheRecord.

This CL does not create any behavioral change.

Bug: 968028, 1074201
Change-Id: I19a0a81794e7838c8f882faa6aeab9d7b085f756
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2202980Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769614}
parent 9a48c272
......@@ -87,7 +87,7 @@ class ChromeVariationsClient : public variations::VariationsClient {
~ChromeVariationsClient() override = default;
bool IsIncognito() const override {
bool IsOffTheRecord() const override {
return browser_context_->IsOffTheRecord();
}
......
......@@ -21,7 +21,7 @@ VariationsURLLoaderThrottle::~VariationsURLLoaderThrottle() = default;
void VariationsURLLoaderThrottle::AppendThrottleIfNeeded(
const variations::VariationsClient* variations_client,
std::vector<std::unique_ptr<blink::URLLoaderThrottle>>* throttles) {
if (!variations_client || variations_client->IsIncognito())
if (!variations_client || variations_client->IsOffTheRecord())
return;
throttles->push_back(std::make_unique<VariationsURLLoaderThrottle>(
......
......@@ -14,10 +14,10 @@ class VariationsClient {
public:
virtual ~VariationsClient() = default;
// Returns whether the user is operating in an incognito context.
// Returns whether the user is operating in an OffTheRecord context.
// Note components/variations code can't call the BrowserContext method
// directly or we'd end up with a circular dependency.
virtual bool IsIncognito() const = 0;
virtual bool IsOffTheRecord() const = 0;
// Returns the variations header that should be appended for google requests.
virtual std::string GetVariationsHeader() const = 0;
......
......@@ -110,7 +110,7 @@ void FieldTrialSynchronizer::UpdateRendererVariationsHeader(
host->GetBrowserContext()->GetVariationsClient();
// |client| might be null in tests.
if (!client || client->IsIncognito())
if (!client || client->IsOffTheRecord())
return;
mojo::AssociatedRemote<mojom::RendererVariationsConfiguration>
......
......@@ -261,7 +261,7 @@ class BrowserContextImpl::WebLayerVariationsClient
~WebLayerVariationsClient() override = default;
bool IsIncognito() const override {
bool IsOffTheRecord() const override {
return browser_context_->IsOffTheRecord();
}
......
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