summaryrefslogtreecommitdiffstats
path: root/sync/sessions
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 06:01:13 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 06:01:13 +0000
commitde7928d2ef16116b4f0c39ec82165e07c8c67399 (patch)
treea494ec7026a2f8545c6b62a5295fe473e9494831 /sync/sessions
parent37777701cd5bdc7fe04f66297a80423a8434eb59 (diff)
downloadchromium_src-de7928d2ef16116b4f0c39ec82165e07c8c67399.zip
chromium_src-de7928d2ef16116b4f0c39ec82165e07c8c67399.tar.gz
chromium_src-de7928d2ef16116b4f0c39ec82165e07c8c67399.tar.bz2
sync: Populate debug counters for directory types
Modifies the directory update handlers and commit contributors to make use of the debug info emitters. Previously, the debug info emitters were available but unused. This change makes it so the counters are updated and their observers notified at appropriate times. Updates some tests to rely on these counters rather than the StatusController. Eventually, these counters will replace most existing uses of StatusController. The code does not currently contain any non-test observers, so these newly updated values are currently not reported anywhere. BUG=349301 Review URL: https://codereview.chromium.org/271613006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270590 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/sessions')
-rw-r--r--sync/sessions/directory_type_debug_info_emitter.cc8
-rw-r--r--sync/sessions/directory_type_debug_info_emitter.h4
2 files changed, 9 insertions, 3 deletions
diff --git a/sync/sessions/directory_type_debug_info_emitter.cc b/sync/sessions/directory_type_debug_info_emitter.cc
index 9f55716..031d0eb 100644
--- a/sync/sessions/directory_type_debug_info_emitter.cc
+++ b/sync/sessions/directory_type_debug_info_emitter.cc
@@ -18,8 +18,12 @@ DirectoryTypeDebugInfoEmitter::DirectoryTypeDebugInfoEmitter(
type_(type),
type_debug_info_observers_(observers) {}
-DirectoryTypeDebugInfoEmitter::DirectoryTypeDebugInfoEmitter()
- : type_(UNSPECIFIED) {}
+DirectoryTypeDebugInfoEmitter::DirectoryTypeDebugInfoEmitter(
+ ModelType type,
+ ObserverList<TypeDebugInfoObserver>* observers)
+ : directory_(NULL),
+ type_(type),
+ type_debug_info_observers_(observers) {}
DirectoryTypeDebugInfoEmitter::~DirectoryTypeDebugInfoEmitter() {}
diff --git a/sync/sessions/directory_type_debug_info_emitter.h b/sync/sessions/directory_type_debug_info_emitter.h
index 0ba37d3..672367d 100644
--- a/sync/sessions/directory_type_debug_info_emitter.h
+++ b/sync/sessions/directory_type_debug_info_emitter.h
@@ -46,7 +46,9 @@ class SYNC_EXPORT_PRIVATE DirectoryTypeDebugInfoEmitter {
ObserverList<TypeDebugInfoObserver>* observers);
// A simple constructor for tests. Should not be used in real code.
- DirectoryTypeDebugInfoEmitter();
+ DirectoryTypeDebugInfoEmitter(
+ ModelType type,
+ ObserverList<TypeDebugInfoObserver>* observers);
virtual ~DirectoryTypeDebugInfoEmitter();