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

Side by Side Diff: extensions/browser/mojo/stash_backend.cc

Issue 638273004: Move stash_backend into extensions/browser/mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/stash_backend.h" 5 #include "extensions/browser/mojo/stash_backend.h"
6 6
7 namespace extensions { 7 namespace extensions {
8 8
9 // An implementation of StashService that forwards calls to a StashBackend. 9 // An implementation of StashService that forwards calls to a StashBackend.
10 class StashServiceImpl : public mojo::InterfaceImpl<StashService> { 10 class StashServiceImpl : public mojo::InterfaceImpl<StashService> {
11 public: 11 public:
12 explicit StashServiceImpl(base::WeakPtr<StashBackend> backend); 12 explicit StashServiceImpl(base::WeakPtr<StashBackend> backend);
13 ~StashServiceImpl() override; 13 ~StashServiceImpl() override;
14 14
15 // mojo::InterfaceImpl<StashService> overrides. 15 // mojo::InterfaceImpl<StashService> overrides.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void StashServiceImpl::RetrieveStash( 64 void StashServiceImpl::RetrieveStash(
65 const mojo::Callback<void(mojo::Array<StashedObjectPtr>)>& callback) { 65 const mojo::Callback<void(mojo::Array<StashedObjectPtr>)>& callback) {
66 if (!backend_) { 66 if (!backend_) {
67 callback.Run(mojo::Array<StashedObjectPtr>(0)); 67 callback.Run(mojo::Array<StashedObjectPtr>(0));
68 return; 68 return;
69 } 69 }
70 callback.Run(backend_->RetrieveStash()); 70 callback.Run(backend_->RetrieveStash());
71 } 71 }
72 72
73 } // namespace extensions 73 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/mojo/stash_backend.h ('k') | extensions/browser/mojo/stash_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698