OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/history/core/browser/typed_url_data_type_controller.h" | 5 #include "components/history/core/browser/typed_url_data_type_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/prefs/pref_service.h" |
10 #include "components/history/core/browser/history_db_task.h" | 11 #include "components/history/core/browser/history_db_task.h" |
11 #include "components/history/core/browser/history_service.h" | 12 #include "components/history/core/browser/history_service.h" |
12 #include "components/prefs/pref_service.h" | |
13 #include "components/sync_driver/sync_client.h" | 13 #include "components/sync_driver/sync_client.h" |
14 | 14 |
15 namespace browser_sync { | 15 namespace browser_sync { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // The history service exposes a special non-standard task API which calls back | 19 // The history service exposes a special non-standard task API which calls back |
20 // once a task has been dispatched, so we have to build a special wrapper around | 20 // once a task has been dispatched, so we have to build a special wrapper around |
21 // the tasks we want to run. | 21 // the tasks we want to run. |
22 class RunTaskOnHistoryThread : public history::HistoryDBTask { | 22 class RunTaskOnHistoryThread : public history::HistoryDBTask { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } else { | 118 } else { |
119 // History must be disabled - don't start. | 119 // History must be disabled - don't start. |
120 LOG(WARNING) << "Cannot access history service - disabling typed url sync"; | 120 LOG(WARNING) << "Cannot access history service - disabling typed url sync"; |
121 return false; | 121 return false; |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 TypedUrlDataTypeController::~TypedUrlDataTypeController() {} | 125 TypedUrlDataTypeController::~TypedUrlDataTypeController() {} |
126 | 126 |
127 } // namespace browser_sync | 127 } // namespace browser_sync |
OLD | NEW |