Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3996)

Unified Diff: chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc

Issue 2806453002: Don't set a default value for the NTPContentSuggestionsEnabled policy if ChromeHome is enabled (Closed)
Patch Set: argh Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/policy/core/common/cloud/user_cloud_policy_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc
diff --git a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc
index a660dff9d5518a58d172bd1e637135cbf2ce436a..e73baacf768c5cd580d496f4ae15f932b7da7c17 100644
--- a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc
+++ b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/sequenced_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/policy/schema_registry_service.h"
@@ -21,6 +22,10 @@
#include "components/policy/core/common/cloud/user_cloud_policy_store.h"
#include "content/public/browser/browser_context.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/android/chrome_feature_list.h"
+#endif
+
namespace policy {
namespace {
@@ -151,11 +156,16 @@ UserCloudPolicyManagerFactory::CreateManagerForOriginalBrowserContext(
const base::FilePath component_policy_cache_dir =
context->GetPath().Append(kPolicy).Append(kComponentsDir);
- std::unique_ptr<UserCloudPolicyManager> manager;
- manager.reset(new UserCloudPolicyManager(
+ auto manager = base::MakeUnique<UserCloudPolicyManager>(
std::move(store), component_policy_cache_dir,
std::unique_ptr<CloudExternalDataManager>(),
- base::ThreadTaskRunnerHandle::Get(), file_task_runner, io_task_runner));
+ base::ThreadTaskRunnerHandle::Get(), file_task_runner, io_task_runner);
+
+#if defined(OS_ANDROID)
+ // TODO(treib): Remove this again. crbug.com/708191
+ if (base::FeatureList::IsEnabled(chrome::android::kChromeHomeFeature))
+ manager->SetChromeHomeEnabled();
+#endif
manager->Init(
SchemaRegistryServiceFactory::GetForContext(context)->registry());
manager_wrappers_[context] = new ManagerWrapper(manager.get());
« no previous file with comments | « no previous file | components/policy/core/common/cloud/user_cloud_policy_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698