-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3319 from brave/tor_profile_rework_take2_rebase
Tor profile rework
- Loading branch information
Showing
61 changed files
with
1,403 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
browser/extensions/brave_extensions_browser_client_impl.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/extensions/brave_extensions_browser_client_impl.h" | ||
|
||
#include <memory> | ||
|
||
#include "brave/browser/extensions/brave_extensions_browser_api_provider.h" | ||
#include "brave/browser/profiles/profile_util.h" | ||
#include "components/prefs/pref_service.h" | ||
|
||
namespace extensions { | ||
|
||
BraveExtensionsBrowserClientImpl::BraveExtensionsBrowserClientImpl() { | ||
BraveExtensionsBrowserClient::Set(this); | ||
AddAPIProvider(std::make_unique<BraveExtensionsBrowserAPIProvider>()); | ||
} | ||
|
||
bool BraveExtensionsBrowserClientImpl::AreExtensionsDisabled( | ||
const base::CommandLine& command_line, | ||
content::BrowserContext* context) { | ||
if (brave::IsTorProfile(context)) | ||
return true; | ||
|
||
return ChromeExtensionsBrowserClient::AreExtensionsDisabled(command_line, | ||
context); | ||
} | ||
|
||
} // namespace extensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSIONS_BROWSER_CLIENT_IMPL_H_ | ||
#define BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSIONS_BROWSER_CLIENT_IMPL_H_ | ||
|
||
#include "brave/extensions/browser/brave_extensions_browser_client.h" | ||
#include "chrome/browser/extensions/chrome_extensions_browser_client.h" | ||
|
||
namespace extensions { | ||
|
||
class BraveExtensionsBrowserClientImpl : public ChromeExtensionsBrowserClient, | ||
public BraveExtensionsBrowserClient { | ||
public: | ||
BraveExtensionsBrowserClientImpl(); | ||
~BraveExtensionsBrowserClientImpl() override = default; | ||
|
||
bool AreExtensionsDisabled(const base::CommandLine& command_line, | ||
content::BrowserContext* context) override; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(BraveExtensionsBrowserClientImpl); | ||
}; | ||
|
||
} // namespace extensions | ||
|
||
#endif // BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSIONS_BROWSER_CLIENT_IMPL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.