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/sync/glue/extension_backed_data_type_controller.h" | 5 #include "chrome/browser/sync/glue/extension_backed_data_type_controller.h" |
6 | 6 |
7 #include "base/sha1.h" | 7 #include "base/sha1.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h" | 10 #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 hash = base::HexEncode(hash.c_str(), hash.length()); | 26 hash = base::HexEncode(hash.c_str(), hash.length()); |
27 return hash; | 27 return hash; |
28 } | 28 } |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 ExtensionBackedDataTypeController::ExtensionBackedDataTypeController( | 32 ExtensionBackedDataTypeController::ExtensionBackedDataTypeController( |
33 const DisableTypeCallback& disable_callback, | 33 const DisableTypeCallback& disable_callback, |
34 syncer::ModelType type, | 34 syncer::ModelType type, |
35 const std::string& extension_hash, | 35 const std::string& extension_hash, |
36 SyncApiComponentFactory* sync_factory, | 36 sync_driver::SyncApiComponentFactory* sync_factory, |
37 Profile* profile) | 37 Profile* profile) |
38 : UIDataTypeController( | 38 : UIDataTypeController( |
39 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 39 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
40 base::Bind(&ChromeReportUnrecoverableError), | 40 base::Bind(&ChromeReportUnrecoverableError), |
41 disable_callback, | 41 disable_callback, |
42 type, | 42 type, |
43 sync_factory), | 43 sync_factory), |
44 extension_hash_(extension_hash), | 44 extension_hash_(extension_hash), |
45 profile_(profile) { | 45 profile_(profile) { |
46 extensions::ExtensionRegistry* registry = | 46 extensions::ExtensionRegistry* registry = |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (IsSyncingExtensionEnabled()) | 121 if (IsSyncingExtensionEnabled()) |
122 return true; | 122 return true; |
123 | 123 |
124 // If the extension is not currently enabled, it means that it has been | 124 // If the extension is not currently enabled, it means that it has been |
125 // disabled since the call to ReadyForStart(), and the notification | 125 // disabled since the call to ReadyForStart(), and the notification |
126 // observer should have already posted a call to disable the type. | 126 // observer should have already posted a call to disable the type. |
127 return false; | 127 return false; |
128 } | 128 } |
129 | 129 |
130 } // namespace browser_sync | 130 } // namespace browser_sync |
OLD | NEW |