1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_ 7 #pragma once 8 9 #include <string> 10 11 #include "chrome/browser/sync/glue/frontend_data_type_controller.h" 12 13 namespace browser_sync { 14 15 class SessionModelAssociator; 16 17 class SessionDataTypeController : public FrontendDataTypeController { 18 public: 19 SessionDataTypeController( 20 ProfileSyncFactory* profile_sync_factory, 21 Profile* profile, 22 ProfileSyncService* sync_service); 23 virtual ~SessionDataTypeController(); 24 25 SessionModelAssociator* GetModelAssociator(); 26 27 // FrontendDataTypeController implementation. 28 virtual syncable::ModelType type() const; 29 30 private: 31 // FrontendDataTypeController implementations. 32 // Datatype specific creation of sync components. 33 virtual void CreateSyncComponents(); 34 // Record unrecoverable errors. 35 virtual void RecordUnrecoverableError( 36 const tracked_objects::Location& from_here, 37 const std::string& message); 38 // Record association time. 39 virtual void RecordAssociationTime(base::TimeDelta time); 40 // Record causes of start failure. 41 virtual void RecordStartFailure(StartResult result); 42 43 DISALLOW_COPY_AND_ASSIGN(SessionDataTypeController); 44 }; 45 46 } // namespace browser_sync 47 48 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_ 49 50