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

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

Issue 388003002: Sync: Display non-severe errors on about:sync in gray color rather than red. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed failing unit test, added extra test case, addressed CR feedback. Created 6 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
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/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
10 #include "chrome/browser/history/history_service.h" 10 #include "chrome/browser/history/history_service.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 #if !defined(OS_ANDROID) 178 #if !defined(OS_ANDROID)
179 RegisterDesktopDataTypes(disabled_types, enabled_types, pss); 179 RegisterDesktopDataTypes(disabled_types, enabled_types, pss);
180 #endif 180 #endif
181 } 181 }
182 182
183 void ProfileSyncComponentsFactoryImpl::DisableBrokenType( 183 void ProfileSyncComponentsFactoryImpl::DisableBrokenType(
184 syncer::ModelType type, 184 syncer::ModelType type,
185 const tracked_objects::Location& from_here, 185 const tracked_objects::Location& from_here,
186 const std::string& message) { 186 const std::string& message) {
187 ProfileSyncService* p = ProfileSyncServiceFactory::GetForProfile(profile_); 187 ProfileSyncService* p = ProfileSyncServiceFactory::GetForProfile(profile_);
188 p->DisableDatatype(type, from_here, message); 188 syncer::SyncError error(
189 from_here, syncer::SyncError::DATATYPE_ERROR, message, type);
190 p->DisableDatatype(error);
189 } 191 }
190 192
191 DataTypeController::DisableTypeCallback 193 DataTypeController::DisableTypeCallback
192 ProfileSyncComponentsFactoryImpl::MakeDisableCallbackFor( 194 ProfileSyncComponentsFactoryImpl::MakeDisableCallbackFor(
193 syncer::ModelType type) { 195 syncer::ModelType type) {
194 return base::Bind(&ProfileSyncComponentsFactoryImpl::DisableBrokenType, 196 return base::Bind(&ProfileSyncComponentsFactoryImpl::DisableBrokenType,
195 weak_factory_.GetWeakPtr(), 197 weak_factory_.GetWeakPtr(),
196 type); 198 type);
197 } 199 }
198 200
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 new TypedUrlModelAssociator(profile_sync_service, 709 new TypedUrlModelAssociator(profile_sync_service,
708 history_backend, 710 history_backend,
709 error_handler); 711 error_handler);
710 TypedUrlChangeProcessor* change_processor = 712 TypedUrlChangeProcessor* change_processor =
711 new TypedUrlChangeProcessor(profile_, 713 new TypedUrlChangeProcessor(profile_,
712 model_associator, 714 model_associator,
713 history_backend, 715 history_backend,
714 error_handler); 716 error_handler);
715 return SyncComponents(model_associator, change_processor); 717 return SyncComponents(model_associator, change_processor);
716 } 718 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/typed_url_model_associator_unittest.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698