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

Unified Diff: shell/android/background_application_loader.cc

Issue 873453004: Use ShellPtr type in ApplicationLoader instead of untyped handles (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix android Created 5 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 side-by-side diff with in-line comments
Download patch
Index: shell/android/background_application_loader.cc
diff --git a/shell/android/background_application_loader.cc b/shell/android/background_application_loader.cc
index 0f72c3c496144f355d84197377e1290caba99034..5a84ccbe5314d195ccabd55ec4d35d37e4b6e6ad 100644
--- a/shell/android/background_application_loader.cc
+++ b/shell/android/background_application_loader.cc
@@ -27,9 +27,9 @@ BackgroundApplicationLoader::~BackgroundApplicationLoader() {
void BackgroundApplicationLoader::Load(ApplicationManager* manager,
const GURL& url,
- ScopedMessagePipeHandle shell_handle,
+ ShellPtr shell,
LoadCallback callback) {
- DCHECK(shell_handle.is_valid());
+ DCHECK(shell);
if (!thread_) {
// TODO(tim): It'd be nice if we could just have each Load call
// result in a new thread like DynamicService{Loader, Runner}. But some
@@ -46,8 +46,7 @@ void BackgroundApplicationLoader::Load(ApplicationManager* manager,
task_runner_->PostTask(
FROM_HERE,
base::Bind(&BackgroundApplicationLoader::LoadOnBackgroundThread,
- base::Unretained(this), manager, url,
- base::Passed(&shell_handle)));
+ base::Unretained(this), manager, url, base::Passed(&shell)));
}
void BackgroundApplicationLoader::OnApplicationError(
@@ -75,9 +74,9 @@ void BackgroundApplicationLoader::Run() {
void BackgroundApplicationLoader::LoadOnBackgroundThread(
ApplicationManager* manager,
const GURL& url,
- ScopedMessagePipeHandle shell_handle) {
+ ShellPtr shell) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
- loader_->Load(manager, url, shell_handle.Pass(), SimpleLoadCallback());
+ loader_->Load(manager, url, shell.Pass(), SimpleLoadCallback());
}
void BackgroundApplicationLoader::OnApplicationErrorOnBackgroundThread(
« no previous file with comments | « shell/android/background_application_loader.h ('k') | shell/android/background_application_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698