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

Unified Diff: shell/android/background_application_loader.cc

Issue 788243007: Moves BackgroundShellApplicationLoader to shell/android (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: merge 2 trunk Created 6 years 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/mojo/application_manager/background_shell_application_loader.cc b/shell/android/background_application_loader.cc
similarity index 67%
rename from mojo/application_manager/background_shell_application_loader.cc
rename to shell/android/background_application_loader.cc
index a89e36add567f0b96d4aaa1316f117710c872ff2..8e6d0f4ae86a320a378f56043605df93434e8315 100644
--- a/mojo/application_manager/background_shell_application_loader.cc
+++ b/shell/android/background_application_loader.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/application_manager/background_shell_application_loader.h"
+#include "shell/android/background_application_loader.h"
#include "base/bind.h"
#include "base/run_loop.h"
@@ -10,7 +10,7 @@
namespace mojo {
-BackgroundShellApplicationLoader::BackgroundShellApplicationLoader(
+BackgroundApplicationLoader::BackgroundApplicationLoader(
scoped_ptr<ApplicationLoader> real_loader,
const std::string& thread_name,
base::MessageLoop::Type message_loop_type)
@@ -20,16 +20,15 @@ BackgroundShellApplicationLoader::BackgroundShellApplicationLoader(
message_loop_created_(true, false) {
}
-BackgroundShellApplicationLoader::~BackgroundShellApplicationLoader() {
+BackgroundApplicationLoader::~BackgroundApplicationLoader() {
if (thread_)
thread_->Join();
}
-void BackgroundShellApplicationLoader::Load(
- ApplicationManager* manager,
- const GURL& url,
- ScopedMessagePipeHandle shell_handle,
- LoadCallback callback) {
+void BackgroundApplicationLoader::Load(ApplicationManager* manager,
+ const GURL& url,
+ ScopedMessagePipeHandle shell_handle,
+ LoadCallback callback) {
DCHECK(shell_handle.is_valid());
if (!thread_) {
// TODO(tim): It'd be nice if we could just have each Load call
@@ -46,23 +45,22 @@ void BackgroundShellApplicationLoader::Load(
task_runner_->PostTask(
FROM_HERE,
- base::Bind(&BackgroundShellApplicationLoader::LoadOnBackgroundThread,
+ base::Bind(&BackgroundApplicationLoader::LoadOnBackgroundThread,
base::Unretained(this), manager, url,
base::Passed(&shell_handle)));
}
-void BackgroundShellApplicationLoader::OnApplicationError(
+void BackgroundApplicationLoader::OnApplicationError(
ApplicationManager* manager,
const GURL& url) {
- task_runner_->PostTask(FROM_HERE,
- base::Bind(&BackgroundShellApplicationLoader::
- OnApplicationErrorOnBackgroundThread,
- base::Unretained(this),
- manager,
- url));
+ task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &BackgroundApplicationLoader::OnApplicationErrorOnBackgroundThread,
+ base::Unretained(this), manager, url));
}
-void BackgroundShellApplicationLoader::Run() {
+void BackgroundApplicationLoader::Run() {
base::MessageLoop message_loop(message_loop_type_);
base::RunLoop loop;
task_runner_ = message_loop.task_runner();
@@ -74,7 +72,7 @@ void BackgroundShellApplicationLoader::Run() {
loader_.reset();
}
-void BackgroundShellApplicationLoader::LoadOnBackgroundThread(
+void BackgroundApplicationLoader::LoadOnBackgroundThread(
ApplicationManager* manager,
const GURL& url,
ScopedMessagePipeHandle shell_handle) {
@@ -82,7 +80,7 @@ void BackgroundShellApplicationLoader::LoadOnBackgroundThread(
loader_->Load(manager, url, shell_handle.Pass(), SimpleLoadCallback());
}
-void BackgroundShellApplicationLoader::OnApplicationErrorOnBackgroundThread(
+void BackgroundApplicationLoader::OnApplicationErrorOnBackgroundThread(
ApplicationManager* manager,
const GURL& url) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
« 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