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

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

Issue 10825068: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
7 #include "chrome/browser/extensions/app_notification_manager.h" 8 #include "chrome/browser/extensions/app_notification_manager.h"
8 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
10 #include "chrome/browser/extensions/extension_system_factory.h" 11 #include "chrome/browser/extensions/extension_system_factory.h"
11 #include "chrome/browser/extensions/settings/settings_frontend.h" 12 #include "chrome/browser/extensions/settings/settings_frontend.h"
12 #include "chrome/browser/prefs/pref_model_associator.h" 13 #include "chrome/browser/prefs/pref_model_associator.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/search_engines/template_url_service.h" 15 #include "chrome/browser/search_engines/template_url_service.h"
15 #include "chrome/browser/search_engines/template_url_service_factory.h" 16 #include "chrome/browser/search_engines/template_url_service_factory.h"
16 #include "chrome/browser/signin/signin_manager.h" 17 #include "chrome/browser/signin/signin_manager.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 NOTREACHED(); 264 NOTREACHED();
264 return base::WeakPtr<syncer::SyncableService>(); 265 return base::WeakPtr<syncer::SyncableService>();
265 } 266 }
266 } 267 }
267 268
268 ProfileSyncComponentsFactory::SyncComponents 269 ProfileSyncComponentsFactory::SyncComponents
269 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents( 270 ProfileSyncComponentsFactoryImpl::CreateBookmarkSyncComponents(
270 ProfileSyncService* profile_sync_service, 271 ProfileSyncService* profile_sync_service,
271 DataTypeErrorHandler* error_handler) { 272 DataTypeErrorHandler* error_handler) {
272 BookmarkModel* bookmark_model = 273 BookmarkModel* bookmark_model =
273 profile_sync_service->profile()->GetBookmarkModel(); 274 BookmarkModelFactory::GetForProfile(profile_sync_service->profile());
274 syncer::UserShare* user_share = profile_sync_service->GetUserShare(); 275 syncer::UserShare* user_share = profile_sync_service->GetUserShare();
275 // TODO(akalin): We may want to propagate this switch up eventually. 276 // TODO(akalin): We may want to propagate this switch up eventually.
276 #if defined(OS_ANDROID) 277 #if defined(OS_ANDROID)
277 const bool kExpectMobileBookmarksFolder = true; 278 const bool kExpectMobileBookmarksFolder = true;
278 #else 279 #else
279 const bool kExpectMobileBookmarksFolder = false; 280 const bool kExpectMobileBookmarksFolder = false;
280 #endif 281 #endif
281 BookmarkModelAssociator* model_associator = 282 BookmarkModelAssociator* model_associator =
282 new BookmarkModelAssociator(bookmark_model, 283 new BookmarkModelAssociator(bookmark_model,
283 user_share, 284 user_share,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 ProfileSyncComponentsFactory::SyncComponents 339 ProfileSyncComponentsFactory::SyncComponents
339 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( 340 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents(
340 ProfileSyncService* profile_sync_service, 341 ProfileSyncService* profile_sync_service,
341 DataTypeErrorHandler* error_handler) { 342 DataTypeErrorHandler* error_handler) {
342 SessionModelAssociator* model_associator = 343 SessionModelAssociator* model_associator =
343 new SessionModelAssociator(profile_sync_service, error_handler); 344 new SessionModelAssociator(profile_sync_service, error_handler);
344 SessionChangeProcessor* change_processor = 345 SessionChangeProcessor* change_processor =
345 new SessionChangeProcessor(error_handler, model_associator); 346 new SessionChangeProcessor(error_handler, model_associator);
346 return SyncComponents(model_associator, change_processor); 347 return SyncComponents(model_associator, change_processor);
347 } 348 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698