Commit 3819e0e4 authored by Rob Schonberger's avatar Rob Schonberger Committed by Commit Bot

remove FakeProfile, since it is not used anywhere.

Change-Id: I04bbedd2317b7f695fbae52779250d228d9f43b9
Reviewed-on: https://chromium-review.googlesource.com/c/1260805Reviewed-by: default avatarJenny Zhang <jennyz@chromium.org>
Reviewed-by: default avatarMichael Martis <martis@chromium.org>
Commit-Queue: Rob Schonberger <robsc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610756}
parent 86dbf7cf
// Copyright 2013 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 "build/build_config.h"
#include "chrome/browser/ui/app_list/test/fake_profile.h"
FakeProfile::FakeProfile(const std::string& name)
: name_(name) {
BrowserContext::Initialize(this, base::FilePath());
}
FakeProfile::FakeProfile(const std::string& name, const base::FilePath& path)
: name_(name),
path_(path) {
BrowserContext::Initialize(this, path_);
}
std::string FakeProfile::GetProfileUserName() const {
return name_;
}
Profile::ProfileType FakeProfile::GetProfileType() const {
return REGULAR_PROFILE;
}
base::FilePath FakeProfile::GetPath() const {
return path_;
}
std::unique_ptr<content::ZoomLevelDelegate>
FakeProfile::CreateZoomLevelDelegate(const base::FilePath& partition_path) {
return nullptr;
}
bool FakeProfile::IsOffTheRecord() const {
return false;
}
content::DownloadManagerDelegate* FakeProfile::GetDownloadManagerDelegate() {
return nullptr;
}
content::ResourceContext* FakeProfile::GetResourceContext() {
return nullptr;
}
content::BrowserPluginGuestManager* FakeProfile::GetGuestManager() {
return nullptr;
}
storage::SpecialStoragePolicy* FakeProfile::GetSpecialStoragePolicy() {
return nullptr;
}
content::PushMessagingService* FakeProfile::GetPushMessagingService() {
return nullptr;
}
content::SSLHostStateDelegate* FakeProfile::GetSSLHostStateDelegate() {
return nullptr;
}
content::PermissionControllerDelegate*
FakeProfile::GetPermissionControllerDelegate() {
return nullptr;
}
content::BackgroundFetchDelegate* FakeProfile::GetBackgroundFetchDelegate() {
return nullptr;
}
content::BackgroundSyncController* FakeProfile::GetBackgroundSyncController() {
return nullptr;
}
content::BrowsingDataRemoverDelegate*
FakeProfile::GetBrowsingDataRemoverDelegate() {
return nullptr;
}
net::URLRequestContextGetter* FakeProfile::CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) {
return nullptr;
}
net::URLRequestContextGetter*
FakeProfile::CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) {
return nullptr;
}
net::URLRequestContextGetter* FakeProfile::CreateMediaRequestContext() {
return nullptr;
}
net::URLRequestContextGetter*
FakeProfile::CreateMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) {
return nullptr;
}
scoped_refptr<base::SequencedTaskRunner>
FakeProfile::GetIOTaskRunner() {
return scoped_refptr<base::SequencedTaskRunner>();
}
Profile* FakeProfile::GetOffTheRecordProfile() {
return nullptr;
}
void FakeProfile::DestroyOffTheRecordProfile() {}
bool FakeProfile::HasOffTheRecordProfile() {
return false;
}
Profile* FakeProfile::GetOriginalProfile() {
return this;
}
const Profile* FakeProfile::GetOriginalProfile() const {
return this;
}
bool FakeProfile::IsSupervised() const {
return false;
}
bool FakeProfile::IsChild() const {
return false;
}
bool FakeProfile::IsLegacySupervised() const {
return false;
}
ExtensionSpecialStoragePolicy* FakeProfile::GetExtensionSpecialStoragePolicy() {
return nullptr;
}
PrefService* FakeProfile::GetPrefs() {
return nullptr;
}
const PrefService* FakeProfile::GetPrefs() const {
return nullptr;
}
PrefService* FakeProfile::GetOffTheRecordPrefs() {
return nullptr;
}
net::URLRequestContextGetter* FakeProfile::GetRequestContext() {
return nullptr;
}
base::OnceCallback<net::CookieStore*()>
FakeProfile::GetExtensionsCookieStoreGetter() {
return base::BindOnce([]() -> net::CookieStore* { return nullptr; });
}
bool FakeProfile::IsSameProfile(Profile* profile) {
return false;
}
base::Time FakeProfile::GetStartTime() const {
return base::Time();
}
base::FilePath FakeProfile::last_selected_directory() {
return base::FilePath();
}
void FakeProfile::set_last_selected_directory(const base::FilePath& path) {}
void FakeProfile::ChangeAppLocale(
const std::string& locale, AppLocaleChangedVia via) {}
void FakeProfile::OnLogin() {}
void FakeProfile::InitChromeOSPreferences() {}
GURL FakeProfile::GetHomePage() {
return GURL();
}
bool FakeProfile::WasCreatedByVersionOrLater(const std::string& version) {
return false;
}
void FakeProfile::SetExitType(ExitType exit_type) {
}
Profile::ExitType FakeProfile::GetLastSessionExitType() {
return EXIT_NORMAL;
}
// Copyright 2013 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.
#ifndef CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_H_
#define CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_H_
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "components/domain_reliability/clear_mode.h"
#include "content/public/browser/browser_context.h"
class ResourceContext;
namespace net {
class URLRequestContextGetter;
}
namespace content {
class DownloadManagerDelegate;
class ResourceContext;
class SSLHostStateDelegate;
class ZoomLevelDelegate;
}
class FakeProfile : public Profile {
public:
explicit FakeProfile(const std::string& name);
FakeProfile(const std::string& name, const base::FilePath& path);
// Profile overrides.
std::string GetProfileUserName() const override;
ProfileType GetProfileType() const override;
base::FilePath GetPath() const override;
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
const base::FilePath& partition_path) override;
bool IsOffTheRecord() const override;
content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
content::ResourceContext* GetResourceContext() override;
content::BrowserPluginGuestManager* GetGuestManager() override;
storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
content::PushMessagingService* GetPushMessagingService() override;
content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
content::PermissionControllerDelegate* GetPermissionControllerDelegate()
override;
content::BackgroundFetchDelegate* GetBackgroundFetchDelegate() override;
content::BackgroundSyncController* GetBackgroundSyncController() override;
content::BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate()
override;
net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) override;
net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) override;
net::URLRequestContextGetter* CreateMediaRequestContext() override;
net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) override;
scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
Profile* GetOffTheRecordProfile() override;
void DestroyOffTheRecordProfile() override;
bool HasOffTheRecordProfile() override;
Profile* GetOriginalProfile() override;
const Profile* GetOriginalProfile() const override;
bool IsSupervised() const override;
bool IsChild() const override;
bool IsLegacySupervised() const override;
ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override;
PrefService* GetPrefs() override;
const PrefService* GetPrefs() const override;
PrefService* GetOffTheRecordPrefs() override;
net::URLRequestContextGetter* GetRequestContext() override;
base::OnceCallback<net::CookieStore*()> GetExtensionsCookieStoreGetter()
override;
bool IsSameProfile(Profile* profile) override;
base::Time GetStartTime() const override;
base::FilePath last_selected_directory() override;
void set_last_selected_directory(const base::FilePath& path) override;
void ChangeAppLocale(const std::string& locale,
AppLocaleChangedVia via) override;
void OnLogin() override;
void InitChromeOSPreferences() override;
GURL GetHomePage() override;
bool WasCreatedByVersionOrLater(const std::string& version) override;
void SetExitType(ExitType exit_type) override;
ExitType GetLastSessionExitType() override;
private:
std::string name_;
base::FilePath path_;
};
#endif // CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_H_
......@@ -4455,8 +4455,6 @@ test("unit_tests") {
"../browser/ui/app_list/search/tests/tokenized_string_unittest.cc",
"../browser/ui/app_list/test/fake_app_list_model_updater.cc",
"../browser/ui/app_list/test/fake_app_list_model_updater.h",
"../browser/ui/app_list/test/fake_profile.cc",
"../browser/ui/app_list/test/fake_profile.h",
]
deps += [
# TODO(wutao): Put new icons resources to ash/public/cpp/vector_icons/
......
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