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

Side by Side Diff: content/public/browser/graph/browser_context_dependency_visitor_impl.h

Issue 18796007: Content API changes to integrate base/graph. (Closed) Base URL: marinoni.mon:/usr/local/google/src/chromium/src@base_graph_review
Patch Set: Created 7 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
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_GRAPH_BROWSER_CONTEXT_DEPENDENCY_VISITOR_IMPL_H_
6 #define CONTENT_PUBLIC_BROWSER_GRAPH_BROWSER_CONTEXT_DEPENDENCY_VISITOR_IMPL_H_
7
8 #include "base/callback.h"
9 #include "base/compiler_specific.h"
10 #include "base/graph/dependency_manager_instance.h"
11 #include "content/public/browser/graph/browser_context_dependency_visitor.h"
12
13 namespace content {
14
15 template <typename Component>
16 class BrowserContextDependencyVisitorImpl
17 : public BrowserContextDependencyVisitor {
18 public:
19 explicit BrowserContextDependencyVisitorImpl(
20 const base::Callback<void(Component*)>& completion_callback)
21 : completion_callback_(completion_callback) {}
22
23 virtual void Visit(
24 graph::DependencyManagerInstance* dependency_manager) OVERRIDE {
25 if (dependency_manager)
26 dependency_manager->Get<Component>(completion_callback_);
27 else
28 completion_callback_.Run(NULL);
29 }
30
31 private:
32 base::Callback<void(Component*)> completion_callback_;
33 };
34
35 } // namespace content
36
37 #endif // CONTENT_PUBLIC_BROWSER_GRAPH_BROWSER_CONTEXT_DEPENDENCY_VISITOR_IMPL_ H_
OLDNEW
« no previous file with comments | « content/public/browser/graph/browser_context_dependency_visitor.h ('k') | content/public/test/test_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698