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

Side by Side Diff: sync/tools/sync_client.cc

Issue 1539843002: Convert Pass()→std::move() in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up Created 4 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « sync/test/fake_server/fake_server.cc ('k') | sync/util/cryptographer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6
7 #include <cstddef> 6 #include <cstddef>
8 #include <cstdio> 7 #include <cstdio>
9 #include <string> 8 #include <string>
9 #include <utility>
10 10
11 #include "base/at_exit.h" 11 #include "base/at_exit.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/debug/stack_trace.h" 14 #include "base/debug/stack_trace.h"
15 #include "base/files/scoped_temp_dir.h" 15 #include "base/files/scoped_temp_dir.h"
16 #include "base/json/json_writer.h" 16 #include "base/json/json_writer.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 << syncer::ObjectIdToString(*ids_it); 234 << syncer::ObjectIdToString(*ids_it);
235 } else { 235 } else {
236 syncer::SingleObjectInvalidationSet invalidation_set = 236 syncer::SingleObjectInvalidationSet invalidation_set =
237 invalidation_map.ForObject(*ids_it); 237 invalidation_map.ForObject(*ids_it);
238 for (syncer::SingleObjectInvalidationSet::const_iterator inv_it = 238 for (syncer::SingleObjectInvalidationSet::const_iterator inv_it =
239 invalidation_set.begin(); 239 invalidation_set.begin();
240 inv_it != invalidation_set.end(); 240 inv_it != invalidation_set.end();
241 ++inv_it) { 241 ++inv_it) {
242 scoped_ptr<syncer::InvalidationInterface> inv_adapter( 242 scoped_ptr<syncer::InvalidationInterface> inv_adapter(
243 new InvalidationAdapter(*inv_it)); 243 new InvalidationAdapter(*inv_it));
244 sync_manager_->OnIncomingInvalidation(type, inv_adapter.Pass()); 244 sync_manager_->OnIncomingInvalidation(type, std::move(inv_adapter));
245 } 245 }
246 } 246 }
247 } 247 }
248 } 248 }
249 249
250 std::string GetOwnerName() const override { return "InvalidatorShim"; } 250 std::string GetOwnerName() const override { return "InvalidatorShim"; }
251 251
252 private: 252 private:
253 SyncManager* sync_manager_; 253 SyncManager* sync_manager_;
254 }; 254 };
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 InternalComponentsFactoryImpl::Switches factory_switches = { 421 InternalComponentsFactoryImpl::Switches factory_switches = {
422 InternalComponentsFactory::ENCRYPTION_KEYSTORE, 422 InternalComponentsFactory::ENCRYPTION_KEYSTORE,
423 InternalComponentsFactory::BACKOFF_NORMAL 423 InternalComponentsFactory::BACKOFF_NORMAL
424 }; 424 };
425 CancelationSignal scm_cancelation_signal; 425 CancelationSignal scm_cancelation_signal;
426 426
427 SyncManager::InitArgs args; 427 SyncManager::InitArgs args;
428 args.database_location = database_dir.path(); 428 args.database_location = database_dir.path();
429 args.event_handler = WeakHandle<JsEventHandler>(js_event_handler.AsWeakPtr()); 429 args.event_handler = WeakHandle<JsEventHandler>(js_event_handler.AsWeakPtr());
430 args.service_url = GURL(kSyncServiceURL); 430 args.service_url = GURL(kSyncServiceURL);
431 args.post_factory = post_factory.Pass(); 431 args.post_factory = std::move(post_factory);
432 args.workers = workers; 432 args.workers = workers;
433 args.extensions_activity = extensions_activity; 433 args.extensions_activity = extensions_activity;
434 args.change_delegate = &change_delegate; 434 args.change_delegate = &change_delegate;
435 args.credentials = credentials; 435 args.credentials = credentials;
436 args.invalidator_client_id = invalidator_id; 436 args.invalidator_client_id = invalidator_id;
437 args.restored_key_for_bootstrapping = kRestoredKeyForBootstrapping; 437 args.restored_key_for_bootstrapping = kRestoredKeyForBootstrapping;
438 args.restored_keystore_key_for_bootstrapping = 438 args.restored_keystore_key_for_bootstrapping =
439 kRestoredKeystoreKeyForBootstrapping; 439 kRestoredKeystoreKeyForBootstrapping;
440 args.internal_components_factory.reset( 440 args.internal_components_factory.reset(
441 new InternalComponentsFactoryImpl(factory_switches)); 441 new InternalComponentsFactoryImpl(factory_switches));
(...skipping 17 matching lines...) Expand all
459 io_thread.Stop(); 459 io_thread.Stop();
460 return 0; 460 return 0;
461 } 461 }
462 462
463 } // namespace 463 } // namespace
464 } // namespace syncer 464 } // namespace syncer
465 465
466 int main(int argc, char* argv[]) { 466 int main(int argc, char* argv[]) {
467 return syncer::SyncClientMain(argc, argv); 467 return syncer::SyncClientMain(argc, argv);
468 } 468 }
OLDNEW
« no previous file with comments | « sync/test/fake_server/fake_server.cc ('k') | sync/util/cryptographer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698