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

Unified Diff: chrome/browser/sync/glue/theme_model_associator.cc

Issue 7461098: Reland 87645 with clang fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/theme_model_associator.cc
diff --git a/chrome/browser/sync/glue/theme_model_associator.cc b/chrome/browser/sync/glue/theme_model_associator.cc
index e53b021620db3224d18f59d807d6dd5d099efcc9..5638badc37b79578abba3606c194b202edd3cc3b 100644
--- a/chrome/browser/sync/glue/theme_model_associator.cc
+++ b/chrome/browser/sync/glue/theme_model_associator.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/tracked.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/sync/api/sync_error.h"
#include "chrome/browser/sync/engine/syncapi.h"
#include "chrome/browser/sync/glue/sync_backend_host.h"
#include "chrome/browser/sync/glue/theme_util.h"
@@ -35,11 +36,11 @@ ThemeModelAssociator::ThemeModelAssociator(
ThemeModelAssociator::~ThemeModelAssociator() {}
-bool ThemeModelAssociator::AssociateModels() {
+bool ThemeModelAssociator::AssociateModels(SyncError* error) {
sync_api::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare());
sync_api::ReadNode root(&trans);
if (!root.InitByTagLookup(kThemesTag)) {
- LOG(ERROR) << kNoThemesFolderError;
+ error->Reset(FROM_HERE, kNoThemesFolderError, model_type());
return false;
}
@@ -62,7 +63,9 @@ bool ThemeModelAssociator::AssociateModels() {
sync_api::WriteNode node(&trans);
if (!node.InitUniqueByCreation(syncable::THEMES, root,
kCurrentThemeClientTag)) {
- LOG(ERROR) << "Could not create current theme node.";
+ error->Reset(FROM_HERE,
+ "Could not create current theme node.",
+ model_type());
return false;
}
node.SetIsFolder(false);
@@ -74,7 +77,7 @@ bool ThemeModelAssociator::AssociateModels() {
return true;
}
-bool ThemeModelAssociator::DisassociateModels() {
+bool ThemeModelAssociator::DisassociateModels(SyncError* error) {
// We don't maintain any association state, so nothing to do.
return true;
}
« no previous file with comments | « chrome/browser/sync/glue/theme_model_associator.h ('k') | chrome/browser/sync/glue/typed_url_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698