| Index: chrome/browser/sync/sessions2/session_data_type_controller2.cc
|
| diff --git a/chrome/browser/sync/glue/session_data_type_controller.cc b/chrome/browser/sync/sessions2/session_data_type_controller2.cc
|
| similarity index 55%
|
| copy from chrome/browser/sync/glue/session_data_type_controller.cc
|
| copy to chrome/browser/sync/sessions2/session_data_type_controller2.cc
|
| index 8e69ad5c53d23827a7fdc071acb435afe3879948..0add2e7dba174acd7b3652ae4f03b299d598e81c 100644
|
| --- a/chrome/browser/sync/glue/session_data_type_controller.cc
|
| +++ b/chrome/browser/sync/sessions2/session_data_type_controller2.cc
|
| @@ -1,13 +1,11 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/sync/glue/session_data_type_controller.h"
|
| +#include "chrome/browser/sync/sessions2/session_data_type_controller2.h"
|
|
|
| -#include "base/metrics/histogram.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/sync/glue/synced_window_delegate.h"
|
| -#include "chrome/browser/sync/profile_sync_components_factory.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/notification_details.h"
|
| #include "content/public/browser/notification_service.h"
|
| @@ -15,24 +13,19 @@
|
|
|
| namespace browser_sync {
|
|
|
| -SessionDataTypeController::SessionDataTypeController(
|
| +SessionDataTypeController2::SessionDataTypeController2(
|
| ProfileSyncComponentsFactory* profile_sync_factory,
|
| Profile* profile,
|
| ProfileSyncService* sync_service)
|
| - : FrontendDataTypeController(profile_sync_factory,
|
| - profile,
|
| - sync_service) {
|
| + : UIDataTypeController(syncer::SESSIONS,
|
| + profile_sync_factory,
|
| + profile,
|
| + sync_service) {
|
| }
|
|
|
| -SessionModelAssociator* SessionDataTypeController::GetModelAssociator() {
|
| - return reinterpret_cast<SessionModelAssociator*>(model_associator_.get());
|
| -}
|
| -
|
| -syncer::ModelType SessionDataTypeController::type() const {
|
| - return syncer::SESSIONS;
|
| -}
|
| +SessionDataTypeController2::~SessionDataTypeController2() {}
|
|
|
| -bool SessionDataTypeController::StartModels() {
|
| +bool SessionDataTypeController2::StartModels() {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| std::set<browser_sync::SyncedWindowDelegate*> window =
|
| browser_sync::SyncedWindowDelegate::GetSyncedWindowDelegates();
|
| @@ -49,12 +42,7 @@ bool SessionDataTypeController::StartModels() {
|
| return true;
|
| }
|
|
|
| -// Cleanup for our extra registrar usage.
|
| -void SessionDataTypeController::CleanUpState() {
|
| - notification_registrar_.RemoveAll();
|
| -}
|
| -
|
| -void SessionDataTypeController::Observe(
|
| +void SessionDataTypeController2::Observe(
|
| int type,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| @@ -65,13 +53,4 @@ void SessionDataTypeController::Observe(
|
| OnModelLoaded();
|
| }
|
|
|
| -SessionDataTypeController::~SessionDataTypeController() {}
|
| -
|
| -void SessionDataTypeController::CreateSyncComponents() {
|
| - ProfileSyncComponentsFactory::SyncComponents sync_components =
|
| - profile_sync_factory_->CreateSessionSyncComponents(sync_service_, this);
|
| - set_model_associator(sync_components.model_associator);
|
| - set_change_processor(sync_components.change_processor);
|
| -}
|
| -
|
| } // namespace browser_sync
|
|
|