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

Unified Diff: trunk/src/mojo/services/view_manager/view_manager_init_service_impl.cc

Issue 405803002: Revert 284322 "Allow EmbedRoot to be called multiple times." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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: trunk/src/mojo/services/view_manager/view_manager_init_service_impl.cc
===================================================================
--- trunk/src/mojo/services/view_manager/view_manager_init_service_impl.cc (revision 284322)
+++ trunk/src/mojo/services/view_manager/view_manager_init_service_impl.cc (working copy)
@@ -44,8 +44,11 @@
void ViewManagerInitServiceImpl::EmbedRoot(
const String& url,
const Callback<void(bool)>& callback) {
- // TODO(beng): This means you can only have one EmbedRoot in flight at a time.
- // Keep a vector of these around instead.
+ if (connect_params_) {
+ DVLOG(1) << "Ignoring second connect";
+ callback.Run(false);
+ return;
+ }
connect_params_.reset(new ConnectParams);
connect_params_->url = url.To<std::string>();
connect_params_->callback = callback;

Powered by Google App Engine
This is Rietveld 408576698