2015-10-17 02:44:00 +02:00
|
|
|
// Copyright (c) 2015 The Chromium Embedded Framework Authors.
|
|
|
|
// Portions copyright (c) 2012 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 "libcef/browser/chrome_profile_stub.h"
|
|
|
|
|
2018-10-02 14:14:11 +02:00
|
|
|
#include "content/public/browser/resource_context.h"
|
|
|
|
#include "net/url_request/url_request_context.h"
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
ChromeProfileStub::ChromeProfileStub() {}
|
2015-10-17 02:44:00 +02:00
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
ChromeProfileStub::~ChromeProfileStub() {}
|
2015-10-17 02:44:00 +02:00
|
|
|
|
2019-09-04 17:13:32 +02:00
|
|
|
bool ChromeProfileStub::IsOffTheRecord() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ChromeProfileStub::IsOffTheRecord() const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
scoped_refptr<base::SequencedTaskRunner> ChromeProfileStub::GetIOTaskRunner() {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return scoped_refptr<base::SequencedTaskRunner>();
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string ChromeProfileStub::GetProfileUserName() const {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return std::string();
|
|
|
|
}
|
|
|
|
|
|
|
|
Profile::ProfileType ChromeProfileStub::GetProfileType() const {
|
|
|
|
return REGULAR_PROFILE;
|
|
|
|
}
|
|
|
|
|
|
|
|
Profile* ChromeProfileStub::GetOffTheRecordProfile() {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2015-10-17 02:44:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ChromeProfileStub::DestroyOffTheRecordProfile() {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool ChromeProfileStub::HasOffTheRecordProfile() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
Profile* ChromeProfileStub::GetOriginalProfile() {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2017-12-07 22:44:24 +01:00
|
|
|
const Profile* ChromeProfileStub::GetOriginalProfile() const {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
bool ChromeProfileStub::IsSupervised() const {
|
2015-10-17 02:44:00 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
bool ChromeProfileStub::IsChild() const {
|
2015-10-17 02:44:00 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
bool ChromeProfileStub::IsLegacySupervised() const {
|
2015-10-17 02:44:00 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
ExtensionSpecialStoragePolicy*
|
2017-05-17 11:29:28 +02:00
|
|
|
ChromeProfileStub::GetExtensionSpecialStoragePolicy() {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2015-10-17 02:44:00 +02:00
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
PrefService* ChromeProfileStub::GetOffTheRecordPrefs() {
|
|
|
|
NOTREACHED();
|
2020-01-15 14:36:24 +01:00
|
|
|
return nullptr;
|
2015-10-17 02:44:00 +02:00
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
bool ChromeProfileStub::IsSameProfile(Profile* profile) {
|
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
base::Time ChromeProfileStub::GetStartTime() const {
|
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return base::Time();
|
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
base::FilePath ChromeProfileStub::last_selected_directory() {
|
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return base::FilePath();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChromeProfileStub::set_last_selected_directory(
|
2016-11-07 20:14:09 +01:00
|
|
|
const base::FilePath& path) {
|
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
}
|
|
|
|
|
2016-11-07 20:14:09 +01:00
|
|
|
GURL ChromeProfileStub::GetHomePage() {
|
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return GURL();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
bool ChromeProfileStub::WasCreatedByVersionOrLater(const std::string& version) {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-09-04 17:13:32 +02:00
|
|
|
bool ChromeProfileStub::IsIndependentOffTheRecordProfile() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2015-10-17 02:44:00 +02:00
|
|
|
void ChromeProfileStub::SetExitType(ExitType exit_type) {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Profile::ExitType ChromeProfileStub::GetLastSessionExitType() {
|
2016-11-07 20:14:09 +01:00
|
|
|
NOTREACHED();
|
2015-10-17 02:44:00 +02:00
|
|
|
return EXIT_NORMAL;
|
|
|
|
}
|
2019-10-01 15:55:16 +02:00
|
|
|
|
|
|
|
base::Time ChromeProfileStub::GetCreationTime() const {
|
|
|
|
NOTREACHED();
|
|
|
|
return base::Time();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChromeProfileStub::SetCreationTimeForTesting(base::Time creation_time) {
|
|
|
|
NOTREACHED();
|
|
|
|
}
|