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

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

Issue 265823009: Let SyncManagerFactory create different types of sync managers according to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot Created 6 years, 7 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 MakeWeakHandle(weak_factory_.GetWeakPtr()))); 516 MakeWeakHandle(weak_factory_.GetWeakPtr())));
517 517
518 backend_->Initialize( 518 backend_->Initialize(
519 this, 519 this,
520 sync_thread_.Pass(), 520 sync_thread_.Pass(),
521 GetJsEventHandler(), 521 GetJsEventHandler(),
522 sync_service_url_, 522 sync_service_url_,
523 credentials, 523 credentials,
524 delete_stale_data, 524 delete_stale_data,
525 scoped_ptr<syncer::SyncManagerFactory>( 525 scoped_ptr<syncer::SyncManagerFactory>(
526 new syncer::SyncManagerFactory).Pass(), 526 new syncer::SyncManagerFactory(
527 syncer::SyncManagerFactory::NORMAL)).Pass(),
527 backend_unrecoverable_error_handler.Pass(), 528 backend_unrecoverable_error_handler.Pass(),
528 &browser_sync::ChromeReportUnrecoverableError, 529 &browser_sync::ChromeReportUnrecoverableError,
529 network_resources_.get()); 530 network_resources_.get());
530 } 531 }
531 532
532 bool ProfileSyncService::IsEncryptedDatatypeEnabled() const { 533 bool ProfileSyncService::IsEncryptedDatatypeEnabled() const {
533 if (encryption_pending()) 534 if (encryption_pending())
534 return true; 535 return true;
535 const syncer::ModelTypeSet preferred_types = GetPreferredDataTypes(); 536 const syncer::ModelTypeSet preferred_types = GetPreferredDataTypes();
536 const syncer::ModelTypeSet encrypted_types = GetEncryptedDataTypes(); 537 const syncer::ModelTypeSet encrypted_types = GetEncryptedDataTypes();
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 status.last_get_token_error = last_get_token_error_; 2371 status.last_get_token_error = last_get_token_error_;
2371 if (request_access_token_retry_timer_.IsRunning()) 2372 if (request_access_token_retry_timer_.IsRunning())
2372 status.next_token_request_time = next_token_request_time_; 2373 status.next_token_request_time = next_token_request_time_;
2373 return status; 2374 return status;
2374 } 2375 }
2375 2376
2376 void ProfileSyncService::OverrideNetworkResourcesForTest( 2377 void ProfileSyncService::OverrideNetworkResourcesForTest(
2377 scoped_ptr<syncer::NetworkResources> network_resources) { 2378 scoped_ptr<syncer::NetworkResources> network_resources) {
2378 network_resources_ = network_resources.Pass(); 2379 network_resources_ = network_resources.Pass();
2379 } 2380 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc ('k') | sync/internal_api/public/sync_manager_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698