2017-07-27 01:19:27 +02:00
|
|
|
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
2020-07-08 19:23:29 +02:00
|
|
|
index f81028b5cda7..9b934d020ce6 100644
|
2017-07-27 01:19:27 +02:00
|
|
|
--- chrome/browser/profiles/profile_manager.cc
|
|
|
|
+++ chrome/browser/profiles/profile_manager.cc
|
2020-07-08 19:23:29 +02:00
|
|
|
@@ -377,7 +377,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
2019-10-01 15:55:16 +02:00
|
|
|
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
|
|
|
|
content::NotificationService::AllSources());
|
2017-09-06 23:40:58 +02:00
|
|
|
|
2017-07-27 01:19:27 +02:00
|
|
|
- if (ProfileShortcutManager::IsFeatureEnabled() && !user_data_dir_.empty())
|
|
|
|
+ if (!user_data_dir_.empty() && ProfileShortcutManager::IsFeatureEnabled())
|
2019-02-01 17:42:40 +01:00
|
|
|
profile_shortcut_manager_ = ProfileShortcutManager::Create(this);
|
2017-07-27 01:19:27 +02:00
|
|
|
}
|
2019-02-01 17:42:40 +01:00
|
|
|
|
2016-07-18 23:22:22 +02:00
|
|
|
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
2020-03-30 22:13:42 +02:00
|
|
|
index 3e1e28ea7d0e..b70f718c8e94 100644
|
2016-07-18 23:22:22 +02:00
|
|
|
--- chrome/browser/profiles/profile_manager.h
|
|
|
|
+++ chrome/browser/profiles/profile_manager.h
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -101,7 +101,7 @@ class ProfileManager : public content::NotificationObserver,
|
2016-08-04 14:37:53 +02:00
|
|
|
// acceptable. Returns null if creation of the new profile fails.
|
|
|
|
// TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then
|
|
|
|
// make this method private.
|
|
|
|
- Profile* GetProfile(const base::FilePath& profile_dir);
|
|
|
|
+ virtual Profile* GetProfile(const base::FilePath& profile_dir);
|
|
|
|
|
|
|
|
// Returns total number of profiles available on this machine.
|
|
|
|
size_t GetNumberOfProfiles();
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -131,7 +131,7 @@ class ProfileManager : public content::NotificationObserver,
|
2016-07-18 23:22:22 +02:00
|
|
|
|
|
|
|
// Returns true if the profile pointer is known to point to an existing
|
|
|
|
// profile.
|
|
|
|
- bool IsValidProfile(const void* profile);
|
|
|
|
+ virtual bool IsValidProfile(const void* profile);
|
|
|
|
|
|
|
|
// Returns the directory where the first created profile is stored,
|
|
|
|
// relative to the user data directory currently in use.
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -140,7 +140,7 @@ class ProfileManager : public content::NotificationObserver,
|
2016-11-07 20:14:09 +01:00
|
|
|
// Get the Profile last used (the Profile to which owns the most recently
|
|
|
|
// focused window) with this Chrome build. If no signed profile has been
|
|
|
|
// stored in Local State, hand back the Default profile.
|
|
|
|
- Profile* GetLastUsedProfile(const base::FilePath& user_data_dir);
|
|
|
|
+ virtual Profile* GetLastUsedProfile(const base::FilePath& user_data_dir);
|
|
|
|
|
|
|
|
// Get the path of the last used profile, or if that's undefined, the default
|
|
|
|
// profile.
|
2019-09-25 15:59:51 +02:00
|
|
|
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc
|
2020-07-04 04:51:17 +02:00
|
|
|
index c1792eccd997..d7434ff76a88 100644
|
2019-09-25 15:59:51 +02:00
|
|
|
--- chrome/browser/profiles/renderer_updater.cc
|
|
|
|
+++ chrome/browser/profiles/renderer_updater.cc
|
|
|
|
@@ -7,6 +7,7 @@
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
#include "base/bind.h"
|
2020-07-04 04:51:17 +02:00
|
|
|
+#include "cef/libcef/features/runtime.h"
|
2019-09-25 15:59:51 +02:00
|
|
|
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
|
|
|
#include "chrome/browser/profiles/profile.h"
|
|
|
|
#include "chrome/browser/signin/identity_manager_factory.h"
|
2020-03-04 01:29:39 +01:00
|
|
|
@@ -62,8 +63,12 @@ void GetGuestViewDefaultContentSettingRules(
|
2019-09-25 15:59:51 +02:00
|
|
|
|
|
|
|
RendererUpdater::RendererUpdater(Profile* profile)
|
|
|
|
: profile_(profile), identity_manager_observer_(this) {
|
2020-07-04 04:51:17 +02:00
|
|
|
- identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
|
|
|
- identity_manager_observer_.Add(identity_manager_);
|
|
|
|
+ if (cef::IsAlloyRuntimeEnabled()) {
|
|
|
|
+ identity_manager_ = nullptr;
|
|
|
|
+ } else {
|
|
|
|
+ identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
|
|
|
+ identity_manager_observer_.Add(identity_manager_);
|
|
|
|
+ }
|
2019-09-25 15:59:51 +02:00
|
|
|
#if defined(OS_CHROMEOS)
|
|
|
|
oauth2_login_manager_ =
|
|
|
|
chromeos::OAuth2LoginManagerFactory::GetForProfile(profile_);
|