OLD | NEW |
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/sync/chrome_sync_client.h" | 5 #include "chrome/browser/sync/chrome_sync_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 144 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
145 return FaviconServiceFactory::GetForProfile( | 145 return FaviconServiceFactory::GetForProfile( |
146 profile_, ServiceAccessType::IMPLICIT_ACCESS); | 146 profile_, ServiceAccessType::IMPLICIT_ACCESS); |
147 } | 147 } |
148 history::HistoryService* GetHistoryService() override { | 148 history::HistoryService* GetHistoryService() override { |
149 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 149 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
150 return HistoryServiceFactory::GetForProfile( | 150 return HistoryServiceFactory::GetForProfile( |
151 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 151 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
152 } | 152 } |
153 bool ShouldSyncURL(const GURL& url) const override { | 153 bool ShouldSyncURL(const GURL& url) const override { |
154 if (url == GURL(chrome::kChromeUIHistoryURL)) { | 154 if (url == chrome::kChromeUIHistoryURL) { |
155 // The history page is treated specially as we want it to trigger syncable | 155 // The history page is treated specially as we want it to trigger syncable |
156 // events for UI purposes. | 156 // events for UI purposes. |
157 return true; | 157 return true; |
158 } | 158 } |
159 return url.is_valid() && !url.SchemeIs(content::kChromeUIScheme) && | 159 return url.is_valid() && !url.SchemeIs(content::kChromeUIScheme) && |
160 !url.SchemeIs(chrome::kChromeNativeScheme) && !url.SchemeIsFile(); | 160 !url.SchemeIs(chrome::kChromeNativeScheme) && !url.SchemeIsFile(); |
161 } | 161 } |
162 | 162 |
163 sync_sessions::SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter() | 163 sync_sessions::SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter() |
164 override { | 164 override { |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 sync_service->RegisterDataTypeController( | 627 sync_service->RegisterDataTypeController( |
628 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 628 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
629 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); | 629 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); |
630 sync_service->RegisterDataTypeController( | 630 sync_service->RegisterDataTypeController( |
631 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 631 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
632 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 632 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
633 #endif | 633 #endif |
634 } | 634 } |
635 | 635 |
636 } // namespace browser_sync | 636 } // namespace browser_sync |
OLD | NEW |