| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_bookmark_client.h" | 5 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/favicon/favicon_service_factory.h" | 11 #include "chrome/browser/favicon/favicon_service_factory.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/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "components/bookmarks/browser/bookmark_model.h" | 15 #include "components/bookmarks/browser/bookmark_model.h" |
| 16 #include "components/bookmarks/browser/bookmark_node.h" | 16 #include "components/bookmarks/browser/bookmark_node.h" |
| 17 #include "components/bookmarks/browser/bookmark_utils.h" | 17 #include "components/bookmarks/browser/bookmark_utils.h" |
| 18 #include "components/bookmarks/managed/managed_bookmarks_tracker.h" | 18 #include "components/bookmarks/managed/managed_bookmarks_tracker.h" |
| 19 #include "components/favicon/core/browser/favicon_service.h" | 19 #include "components/favicon/core/favicon_service.h" |
| 20 #include "components/history/core/browser/history_service.h" | 20 #include "components/history/core/browser/history_service.h" |
| 21 #include "components/history/core/browser/url_database.h" | 21 #include "components/history/core/browser/url_database.h" |
| 22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/browser/notification_details.h" | 23 #include "content/public/browser/notification_details.h" |
| 24 #include "content/public/browser/notification_source.h" | 24 #include "content/public/browser/notification_source.h" |
| 25 #include "content/public/browser/user_metrics.h" | 25 #include "content/public/browser/user_metrics.h" |
| 26 #include "grit/components_strings.h" | 26 #include "grit/components_strings.h" |
| 27 #include "policy/policy_constants.h" | 27 #include "policy/policy_constants.h" |
| 28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
| 29 | 29 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 return extra_nodes.Pass(); | 279 return extra_nodes.Pass(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() { | 282 std::string ChromeBookmarkClient::GetManagedBookmarksDomain() { |
| 283 policy::ProfilePolicyConnector* connector = | 283 policy::ProfilePolicyConnector* connector = |
| 284 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile_); | 284 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile_); |
| 285 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) | 285 if (connector->IsPolicyFromCloudPolicy(policy::key::kManagedBookmarks)) |
| 286 return connector->GetManagementDomain(); | 286 return connector->GetManagementDomain(); |
| 287 return std::string(); | 287 return std::string(); |
| 288 } | 288 } |
| OLD | NEW |