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

Unified Diff: chrome/browser/previews/previews_service.cc

Issue 2300213002: Adding an IO Data and keyed service to previews/ (Closed)
Patch Set: change to unittest Created 4 years, 3 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/previews/previews_service.cc
diff --git a/chrome/browser/previews/previews_service.cc b/chrome/browser/previews/previews_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..62bec2466cc1c8f25f5cf2f91ab6da799ae05f71
--- /dev/null
+++ b/chrome/browser/previews/previews_service.cc
@@ -0,0 +1,27 @@
+// Copyright 2016 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.
+
+#include "chrome/browser/previews/previews_service.h"
+
+#include "components/previews/previews_ui_service.h"
+#include "content/public/browser/browser_thread.h"
+
+PreviewsService::PreviewsService() {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+}
+
+PreviewsService::~PreviewsService() {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+}
+
+void PreviewsService::set_previews_ui_service(
bengr 2016/09/08 00:19:09 You should be able to inline both the getter and s
RyanSturm 2016/09/08 18:34:33 I'm not so sure about the setter, it would at leas
+ std::unique_ptr<previews::PreviewsUIService> previews_ui_service) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ previews_ui_service_ = std::move(previews_ui_service);
+}
+
+previews::PreviewsUIService* PreviewsService::previews_ui_service() {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ return previews_ui_service_.get();
+}

Powered by Google App Engine
This is Rietveld 408576698