Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / search_engine_data_type_controller.cc
index b8f967d..5ac663a 100644 (file)
@@ -17,18 +17,21 @@ using content::BrowserThread;
 namespace browser_sync {
 
 SearchEngineDataTypeController::SearchEngineDataTypeController(
-    SyncApiComponentFactory* sync_factory,
-    Profile* profile,
-    const DisableTypeCallback& disable_callback)
+    sync_driver::SyncApiComponentFactory* sync_factory,
+    Profile* profile)
     : UIDataTypeController(
           BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
           base::Bind(&ChromeReportUnrecoverableError),
-          disable_callback,
           syncer::SEARCH_ENGINES,
           sync_factory),
       profile_(profile) {
 }
 
+TemplateURLService::Subscription*
+SearchEngineDataTypeController::GetSubscriptionForTesting() {
+  return template_url_subscription_.get();
+}
+
 SearchEngineDataTypeController::~SearchEngineDataTypeController() {}
 
 // We want to start the TemplateURLService before we begin associating.
@@ -52,6 +55,10 @@ bool SearchEngineDataTypeController::StartModels() {
   return false;  // Don't continue Start.
 }
 
+void SearchEngineDataTypeController::StopModels() {
+  template_url_subscription_.reset();
+}
+
 void SearchEngineDataTypeController::OnTemplateURLServiceLoaded() {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
   DCHECK_EQ(state_, MODEL_STARTING);