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

Side by Side Diff: chrome/browser/bookmarks/managed_bookmark_service_factory.cc

Issue 2273783002: Move policy generated files to components/policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed headers Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" 5 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "chrome/browser/policy/profile_policy_connector.h" 12 #include "chrome/browser/policy/profile_policy_connector.h"
13 #include "chrome/browser/policy/profile_policy_connector_factory.h" 13 #include "chrome/browser/policy/profile_policy_connector_factory.h"
14 #include "chrome/browser/profiles/incognito_helpers.h" 14 #include "chrome/browser/profiles/incognito_helpers.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "components/bookmarks/managed/managed_bookmark_service.h" 16 #include "components/bookmarks/managed/managed_bookmark_service.h"
17 #include "components/keyed_service/content/browser_context_dependency_manager.h" 17 #include "components/keyed_service/content/browser_context_dependency_manager.h"
18 #include "policy/policy_constants.h" 18 #include "components/policy/policy_constants.h"
19 19
20 namespace { 20 namespace {
21 21
22 std::string GetManagedBookmarksDomain(Profile* profile) { 22 std::string GetManagedBookmarksDomain(Profile* profile) {
23 policy::ProfilePolicyConnector* connector = 23 policy::ProfilePolicyConnector* connector =
24 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile); 24 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile);
25 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) 25 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks))
26 return connector->GetManagementDomain(); 26 return connector->GetManagementDomain();
27 return std::string(); 27 return std::string();
28 } 28 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 content::BrowserContext* ManagedBookmarkServiceFactory::GetBrowserContextToUse( 72 content::BrowserContext* ManagedBookmarkServiceFactory::GetBrowserContextToUse(
73 content::BrowserContext* context) const { 73 content::BrowserContext* context) const {
74 return chrome::GetBrowserContextRedirectedInIncognito(context); 74 return chrome::GetBrowserContextRedirectedInIncognito(context);
75 } 75 }
76 76
77 bool ManagedBookmarkServiceFactory::ServiceIsNULLWhileTesting() const { 77 bool ManagedBookmarkServiceFactory::ServiceIsNULLWhileTesting() const {
78 return true; 78 return true;
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_crash_reporter_client_mac.mm ('k') | chrome/browser/chromeos/arc/arc_policy_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698