| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/shell/dbus_application_loader_linux.h" | 5 #include "mojo/shell/dbus_application_loader_linux.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); | 155 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); |
| 156 if (!shell_handle.is_valid()) | 156 if (!shell_handle.is_valid()) |
| 157 return; | 157 return; |
| 158 | 158 |
| 159 DCHECK(url.SchemeIs("dbus")); | 159 DCHECK(url.SchemeIs("dbus")); |
| 160 DCHECK(url_to_load_context_.find(url) == url_to_load_context_.end()); | 160 DCHECK(url_to_load_context_.find(url) == url_to_load_context_.end()); |
| 161 url_to_load_context_[url] = | 161 url_to_load_context_[url] = |
| 162 new LoadContext(this, bus_, url, shell_handle.Pass()); | 162 new LoadContext(this, bus_, url, shell_handle.Pass()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void DBusApplicationLoader::OnServiceError(ApplicationManager* manager, | 165 void DBusApplicationLoader::OnApplicationError(ApplicationManager* manager, |
| 166 const GURL& url) { | 166 const GURL& url) { |
| 167 // TODO(cmasone): Anything at all in this method here. | 167 // TODO(cmasone): Anything at all in this method here. |
| 168 } | 168 } |
| 169 | 169 |
| 170 void DBusApplicationLoader::ForgetService(const GURL& url) { | 170 void DBusApplicationLoader::ForgetService(const GURL& url) { |
| 171 DCHECK(context_->task_runners()->shell_runner()->BelongsToCurrentThread()); | 171 DCHECK(context_->task_runners()->shell_runner()->BelongsToCurrentThread()); |
| 172 DVLOG(2) << "Forgetting service (url: " << url << ")"; | 172 DVLOG(2) << "Forgetting service (url: " << url << ")"; |
| 173 | 173 |
| 174 LoadContextMap::iterator it = url_to_load_context_.find(url); | 174 LoadContextMap::iterator it = url_to_load_context_.find(url); |
| 175 DCHECK(it != url_to_load_context_.end()) << url; | 175 DCHECK(it != url_to_load_context_.end()) << url; |
| 176 | 176 |
| 177 LoadContext* doomed = it->second; | 177 LoadContext* doomed = it->second; |
| 178 url_to_load_context_.erase(it); | 178 url_to_load_context_.erase(it); |
| 179 | 179 |
| 180 delete doomed; | 180 delete doomed; |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace shell | 183 } // namespace shell |
| 184 } // namespace mojo | 184 } // namespace mojo |
| OLD | NEW |