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

Unified Diff: chrome/browser/sync/glue/data_type_manager.h

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/data_type_manager.h
diff --git a/chrome/browser/sync/glue/data_type_manager.h b/chrome/browser/sync/glue/data_type_manager.h
index eef71a16d0cae10bc5cad0668e7c11b649a076b1..b346eb80b97cee0f1b85ef7b98512c89916fa8c5 100644
--- a/chrome/browser/sync/glue/data_type_manager.h
+++ b/chrome/browser/sync/glue/data_type_manager.h
@@ -7,6 +7,7 @@
#pragma once
#include <set>
+#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/task.h"
@@ -36,7 +37,7 @@ class DataTypeManager {
// Update NotifyDone() in data_type_manager_impl.cc if you update
// this.
- enum ConfigureResult {
+ enum ConfigureStatus {
OK, // Configuration finished without error.
ASSOCIATION_FAILED, // An error occurred during model association.
ABORTED, // Start was aborted by calling Stop() before
@@ -47,35 +48,27 @@ class DataTypeManager {
typedef std::set<syncable::ModelType> TypeSet;
- // In case of an error the location is filled with the location the
- // error originated from. In case of a success the error location value
- // is to be not used.
- // TODO(tim): We should rename this / ConfigureResult to something more
- // flexible like SyncConfigureDoneDetails.
- struct ConfigureResultWithErrorLocation {
- ConfigureResult result;
+ // Note: location and failed_types are only filled when status is not OK.
+ struct ConfigureResult {
+ ConfigureResult();
+ ConfigureResult(ConfigureStatus status,
+ TypeSet requested_types);
+ ConfigureResult(ConfigureStatus status,
+ TypeSet requested_types,
+ TypeSet failed_types,
+ const tracked_objects::Location& location);
+ ~ConfigureResult();
+ ConfigureStatus status;
TypeSet requested_types;
- scoped_ptr<tracked_objects::Location> location;
-
- ConfigureResultWithErrorLocation();
- ConfigureResultWithErrorLocation(const ConfigureResult& result,
- const tracked_objects::Location& location,
- const TypeSet& requested_types)
- : result(result),
- requested_types(requested_types) {
- this->location.reset(new tracked_objects::Location(
- location.function_name(),
- location.file_name(),
- location.line_number(),
- location.program_counter()));
- }
-
- ~ConfigureResultWithErrorLocation();
+ TypeSet failed_types;
+ tracked_objects::Location location;
};
-
virtual ~DataTypeManager() {}
+ // Convert a ConfigureStatus to string for debug purposes.
+ static std::string ConfigureStatusToString(ConfigureStatus status);
+
// Begins asynchronous configuration of data types. Any currently
// running data types that are not in the desired_types set will be
// stopped. Any stopped data types that are in the desired_types
« no previous file with comments | « chrome/browser/sync/glue/bookmark_model_associator.cc ('k') | chrome/browser/sync/glue/data_type_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698