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

Side by Side Diff: mandoline/services/updater/updater_impl.cc

Issue 1565343003: Move mojo/application/public -> mojo/shell/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fetcher
Patch Set: . Created 4 years, 11 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
« no previous file with comments | « mandoline/services/updater/updater_impl.h ('k') | mandoline/ui/desktop_ui/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mandoline/services/updater/updater_impl.h" 5 #include "mandoline/services/updater/updater_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "mandoline/services/updater/updater_app.h" 11 #include "mandoline/services/updater/updater_app.h"
12 #include "mojo/application/public/cpp/application_impl.h" 12 #include "mojo/shell/public/cpp/application_impl.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace updater { 15 namespace updater {
16 16
17 UpdaterImpl::UpdaterImpl(mojo::ApplicationImpl* app_impl, 17 UpdaterImpl::UpdaterImpl(mojo::ApplicationImpl* app_impl,
18 UpdaterApp* application, 18 UpdaterApp* application,
19 mojo::InterfaceRequest<Updater> request) 19 mojo::InterfaceRequest<Updater> request)
20 : application_(application), 20 : application_(application),
21 app_impl_(app_impl), 21 app_impl_(app_impl),
22 binding_(this, std::move(request)) {} 22 binding_(this, std::move(request)) {}
23 23
24 UpdaterImpl::~UpdaterImpl() { 24 UpdaterImpl::~UpdaterImpl() {
25 } 25 }
26 26
27 void UpdaterImpl::GetPathForApp( 27 void UpdaterImpl::GetPathForApp(
28 const mojo::String& url, 28 const mojo::String& url,
29 const Updater::GetPathForAppCallback& callback) { 29 const Updater::GetPathForAppCallback& callback) {
30 // TODO(scottmg): For now, just stub to local files. This will become an 30 // TODO(scottmg): For now, just stub to local files. This will become an
31 // integration with components/update_client. 31 // integration with components/update_client.
32 base::FilePath shell_dir; 32 base::FilePath shell_dir;
33 PathService::Get(base::DIR_MODULE, &shell_dir); 33 PathService::Get(base::DIR_MODULE, &shell_dir);
34 const GURL as_url(url); 34 const GURL as_url(url);
35 const base::FilePath path = shell_dir.Append(base::FilePath::FromUTF8Unsafe( 35 const base::FilePath path = shell_dir.Append(base::FilePath::FromUTF8Unsafe(
36 as_url.path().substr(2, as_url.path().size() - 3) + ".mojo")); 36 as_url.path().substr(2, as_url.path().size() - 3) + ".mojo"));
37 callback.Run(path.AsUTF8Unsafe()); 37 callback.Run(path.AsUTF8Unsafe());
38 } 38 }
39 39
40 } // namespace updater 40 } // namespace updater
OLDNEW
« no previous file with comments | « mandoline/services/updater/updater_impl.h ('k') | mandoline/ui/desktop_ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698