summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/sessions/sync_session_context.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 21:23:00 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 21:23:00 +0000
commit763f848ffbd28b22a6c2aa32bf28184d9c17b366 (patch)
treec6e662f3b95f1b52866c840a96d8ce02a75032cd /chrome/browser/sync/sessions/sync_session_context.h
parent314feb0bc9a98d6ea9cfb576485bf82dd07ffe84 (diff)
downloadchromium_src-763f848ffbd28b22a6c2aa32bf28184d9c17b366.zip
chromium_src-763f848ffbd28b22a6c2aa32bf28184d9c17b366.tar.gz
chromium_src-763f848ffbd28b22a6c2aa32bf28184d9c17b366.tar.bz2
FBTF: Another big ctor/dtor cleanup found by automated tools.
(Shaves ~2MB off Linux Debug .a files) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3563004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/sessions/sync_session_context.h')
-rw-r--r--chrome/browser/sync/sessions/sync_session_context.h29
1 files changed, 7 insertions, 22 deletions
diff --git a/chrome/browser/sync/sessions/sync_session_context.h b/chrome/browser/sync/sessions/sync_session_context.h
index 4c6b63f..b782876 100644
--- a/chrome/browser/sync/sessions/sync_session_context.h
+++ b/chrome/browser/sync/sessions/sync_session_context.h
@@ -20,10 +20,10 @@
#pragma once
#include <string>
-#include "chrome/browser/chrome_thread.h"
+
+#include "base/scoped_ptr.h"
#include "chrome/browser/sync/engine/model_safe_worker.h"
#include "chrome/browser/sync/engine/syncer_types.h"
-#include "chrome/browser/sync/util/extensions_activity_monitor.h"
namespace syncable {
class DirectoryManager;
@@ -32,34 +32,21 @@ class DirectoryManager;
namespace browser_sync {
class ConflictResolver;
+class ExtensionsActivityMonitor;
class ModelSafeWorkerRegistrar;
class ServerConnectionManager;
namespace sessions {
class ScopedSessionContextConflictResolver;
class ScopedSessionContextSyncerEventChannel;
+struct SyncSessionSnapshot;
class SyncSessionContext {
public:
SyncSessionContext(ServerConnectionManager* connection_manager,
syncable::DirectoryManager* directory_manager,
- ModelSafeWorkerRegistrar* model_safe_worker_registrar)
- : resolver_(NULL),
- syncer_event_channel_(NULL),
- connection_manager_(connection_manager),
- directory_manager_(directory_manager),
- registrar_(model_safe_worker_registrar),
- extensions_activity_monitor_(new ExtensionsActivityMonitor()),
- notifications_enabled_(false) {
- }
-
- ~SyncSessionContext() {
- // In unittests, there may be no UI thread, so the above will fail.
- if (!ChromeThread::DeleteSoon(ChromeThread::UI, FROM_HERE,
- extensions_activity_monitor_)) {
- delete extensions_activity_monitor_;
- }
- }
+ ModelSafeWorkerRegistrar* model_safe_worker_registrar);
+ ~SyncSessionContext();
ConflictResolver* resolver() { return resolver_; }
ServerConnectionManager* connection_manager() {
@@ -103,9 +90,7 @@ class SyncSessionContext {
return previous_session_snapshot_.get();
}
- void set_last_snapshot(const SyncSessionSnapshot& snapshot) {
- previous_session_snapshot_.reset(new SyncSessionSnapshot(snapshot));
- }
+ void set_last_snapshot(const SyncSessionSnapshot& snapshot);
private:
// Rather than force clients to set and null-out various context members, we