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

Unified Diff: components/download/internal/startup_status.h

Issue 2895953004: Add initial Controller to DownloadService (Closed)
Patch Set: Rebased Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/download/internal/model_impl_unittest.cc ('k') | components/download/internal/startup_status.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/download/internal/startup_status.h
diff --git a/components/download/internal/startup_status.h b/components/download/internal/startup_status.h
new file mode 100644
index 0000000000000000000000000000000000000000..3e21edf899469714af7ad50d395581d956f13d1d
--- /dev/null
+++ b/components/download/internal/startup_status.h
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_DOWNLOAD_STARTUP_STATUS_H_
+#define COMPONENTS_DOWNLOAD_STARTUP_STATUS_H_
+
+#include "base/macros.h"
+#include "base/optional.h"
+
+namespace download {
+
+// Helper struct to track the initialization status of various Controller
+// internal components.
+struct StartupStatus {
+ StartupStatus();
+ ~StartupStatus();
+
+ base::Optional<bool> driver_ok;
+ base::Optional<bool> model_ok;
+
+ // Whether or not all components have finished initialization. Note that this
+ // does not mean that all components were initialized successfully.
+ bool Complete() const;
+
+ // Whether or not all components have initialized successfully. Should only
+ // be called if Complete() is true.
+ bool Ok() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(StartupStatus);
+};
+
+} // namespace download
+
+#endif // COMPONENTS_DOWNLOAD_STARTUP_STATUS_H_
« no previous file with comments | « components/download/internal/model_impl_unittest.cc ('k') | components/download/internal/startup_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698