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

Unified Diff: shell/application_manager/application_manager.cc

Issue 1378303005: Do some plumbing. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review Created 5 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 side-by-side diff with in-line comments
Download patch
Index: shell/application_manager/application_manager.cc
diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc
index 3d411a7c32bdc0205da247675e3b069241ea916c..8fcfdd549c0666315cace1fa876c7c1921d2bb56 100644
--- a/shell/application_manager/application_manager.cc
+++ b/shell/application_manager/application_manager.cc
@@ -352,7 +352,7 @@ void ApplicationManager::HandleFetchCallback(
// TODO(vtl): (Maybe this should be done by the factory/runner?)
GURL base_resolved_url = GetBaseURLAndQuery(fetcher->GetURL(), nullptr);
- NativeRunnerFactory::Options options;
+ NativeApplicationOptions options;
if (url_to_native_options_.find(base_resolved_url) !=
url_to_native_options_.end()) {
DVLOG(2) << "Applying stored native options to resolved URL "
@@ -371,7 +371,7 @@ void ApplicationManager::HandleFetchCallback(
void ApplicationManager::RunNativeApplication(
InterfaceRequest<Application> application_request,
- const NativeRunnerFactory::Options& options,
+ const NativeApplicationOptions& options,
scoped_ptr<Fetcher> fetcher,
const base::FilePath& path,
bool path_exists) {
@@ -448,19 +448,16 @@ void ApplicationManager::SetArgsForURL(const std::vector<std::string>& args,
}
}
-void ApplicationManager::SetNativeOptionsForURL(
- const NativeRunnerFactory::Options& options,
+NativeApplicationOptions* ApplicationManager::GetNativeApplicationOptionsForURL(
const GURL& url) {
DCHECK(!url.has_query()); // Precondition.
// Apply mappings and resolution to get the resolved URL.
GURL resolved_url =
delegate_->ResolveMojoURL(delegate_->ResolveMappings(url));
- DCHECK(!resolved_url.has_query()); // Still shouldn't have query.
// TODO(vtl): We should probably also remove/disregard the query string (and
// maybe canonicalize in other ways).
- DVLOG(2) << "Storing native options for resolved URL " << resolved_url
- << " (original URL " << url << ")";
- url_to_native_options_[resolved_url] = options;
+ DCHECK(!resolved_url.has_query()); // Still shouldn't have query.
+ return &url_to_native_options_[resolved_url];
}
ApplicationLoader* ApplicationManager::GetLoaderForURL(const GURL& url) {
« no previous file with comments | « shell/application_manager/application_manager.h ('k') | shell/application_manager/native_application_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698