Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: chrome/test/sync/engine/mock_server_connection.cc

Issue 371029: Remove unique naming. (Closed)
Patch Set: Ready and about to go in! Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/sync/engine/mock_server_connection.h ('k') | chrome/test/sync/engine/test_syncable_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/sync/engine/mock_server_connection.cc
diff --git a/chrome/test/sync/engine/mock_server_connection.cc b/chrome/test/sync/engine/mock_server_connection.cc
old mode 100644
new mode 100755
index 28525b27b1abeeb568b07ee0768a85998426a459..fdfb334f05fdc32296758a5852d840024ecfe4a8
--- a/chrome/test/sync/engine/mock_server_connection.cc
+++ b/chrome/test/sync/engine/mock_server_connection.cc
@@ -41,7 +41,7 @@ MockConnectionManager::MockConnectionManager(DirectoryManager* dirmgr,
fail_next_postbuffer_(false),
directory_manager_(dirmgr),
directory_name_(name),
- mid_commit_callback_function_(NULL),
+ mid_commit_callback_(NULL),
mid_commit_observer_(NULL),
throttling_(false),
fail_non_periodic_get_updates_(false),
@@ -59,9 +59,8 @@ void MockConnectionManager::SetCommitTimeRename(string prepend) {
commit_time_rename_prepended_string_ = prepend;
}
-void MockConnectionManager::SetMidCommitCallbackFunction(
- MockConnectionManager::TestCallbackFunction callback) {
- mid_commit_callback_function_ = callback;
+void MockConnectionManager::SetMidCommitCallback(Closure* callback) {
+ mid_commit_callback_ = callback;
}
void MockConnectionManager::SetMidCommitObserver(
@@ -131,9 +130,8 @@ bool MockConnectionManager::PostBufferToPath(const PostBufferParams* params,
}
response.SerializeToString(params->buffer_out);
- if (mid_commit_callback_function_) {
- if (mid_commit_callback_function_(directory))
- mid_commit_callback_function_ = 0;
+ if (mid_commit_callback_) {
+ mid_commit_callback_->Run();
}
if (mid_commit_observer_) {
mid_commit_observer_->Observe();
« no previous file with comments | « chrome/test/sync/engine/mock_server_connection.h ('k') | chrome/test/sync/engine/test_syncable_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698