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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 10701085: Revert "Revert 142517 - [Sync] Refactor sync configuration logic." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile/test Created 8 years, 5 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 | Annotate | Revision Log
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 "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 new browser_sync::BackendUnrecoverableErrorHandler( 345 new browser_sync::BackendUnrecoverableErrorHandler(
346 MakeWeakHandle(weak_factory_.GetWeakPtr()))); 346 MakeWeakHandle(weak_factory_.GetWeakPtr())));
347 347
348 backend_->Initialize( 348 backend_->Initialize(
349 this, 349 this,
350 MakeWeakHandle(sync_js_controller_.AsWeakPtr()), 350 MakeWeakHandle(sync_js_controller_.AsWeakPtr()),
351 sync_service_url_, 351 sync_service_url_,
352 initial_types, 352 initial_types,
353 credentials, 353 credentials,
354 delete_stale_data, 354 delete_stale_data,
355 &sync_manager_factory_,
355 backend_unrecoverable_error_handler_.get(), 356 backend_unrecoverable_error_handler_.get(),
356 &browser_sync::ChromeReportUnrecoverableError); 357 &browser_sync::ChromeReportUnrecoverableError);
357 } 358 }
358 359
359 void ProfileSyncService::CreateBackend() { 360 void ProfileSyncService::CreateBackend() {
360 backend_.reset( 361 backend_.reset(
361 new SyncBackendHost(profile_->GetDebugName(), 362 new SyncBackendHost(profile_->GetDebugName(),
362 profile_, sync_prefs_.AsWeakPtr(), 363 profile_, sync_prefs_.AsWeakPtr(),
363 invalidator_storage_.AsWeakPtr())); 364 invalidator_storage_.AsWeakPtr()));
364 } 365 }
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru. 1723 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru.
1723 ProfileSyncService* old_this = this; 1724 ProfileSyncService* old_this = this;
1724 this->~ProfileSyncService(); 1725 this->~ProfileSyncService();
1725 new(old_this) ProfileSyncService( 1726 new(old_this) ProfileSyncService(
1726 new ProfileSyncComponentsFactoryImpl(profile, 1727 new ProfileSyncComponentsFactoryImpl(profile,
1727 CommandLine::ForCurrentProcess()), 1728 CommandLine::ForCurrentProcess()),
1728 profile, 1729 profile,
1729 signin, 1730 signin,
1730 behavior); 1731 behavior);
1731 } 1732 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698