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

Unified Diff: components/filesystem/file_system_app.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « components/filesystem/file_system_app.h ('k') | components/filesystem/files_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/filesystem/file_system_app.cc
diff --git a/components/filesystem/file_system_app.cc b/components/filesystem/file_system_app.cc
index 662d2e2a3e328abc9b5dec06a6bc3bbbec705328..855ece40c7037ff01eefae5e188b8921b8574ce2 100644
--- a/components/filesystem/file_system_app.cc
+++ b/components/filesystem/file_system_app.cc
@@ -9,17 +9,18 @@
#include "base/bind.h"
#include "base/logging.h"
#include "mojo/shell/public/cpp/application_connection.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
namespace filesystem {
-FileSystemApp::FileSystemApp() : app_(nullptr), in_shutdown_(false) {}
+FileSystemApp::FileSystemApp() : shell_(nullptr), in_shutdown_(false) {}
FileSystemApp::~FileSystemApp() {}
-void FileSystemApp::Initialize(mojo::ApplicationImpl* app) {
- app_ = app;
- tracing_.Initialize(app);
+void FileSystemApp::Initialize(mojo::Shell* shell, const std::string& url,
+ uint32_t id) {
+ shell_ = shell;
+ tracing_.Initialize(shell, url);
}
bool FileSystemApp::AcceptConnection(
@@ -70,7 +71,7 @@ void FileSystemApp::OnDirectoryConnectionError(DirectoryImpl* directory) {
if (in_shutdown_ && client_mapping_.empty()) {
// We just cleared the last directory after our shell connection went
// away. Time to shut ourselves down.
- app_->Quit();
+ shell_->Quit();
}
return;
« no previous file with comments | « components/filesystem/file_system_app.h ('k') | components/filesystem/files_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698