Ensure extensions and the Chrome Web Store are loaded in new BrowsingInstances.

BUG=174943
TEST=Can't post message to CWS.  See bug for repro steps.


Review URL: https://chromiumcodereview.appspot.com/12301013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184208 0039d316-1c4b-4281-b951-d872f2087c98
void RenderViewHostManager::DidNavigateMainFrame(
    RenderViewHost* render_view_host) {
  if (!cross_navigation_pending_) {
    DCHECK(!pending_render_view_host_);

    DCHECK(render_view_host == render_view_host_);

    if (pending_web_ui())
      CommitPending();
    return;
  }

  if (render_view_host == pending_render_view_host_) {
    if (pending_render_view_host_->GetPendingRequestId() == -1) {
      OnCrossSiteResponse(pending_render_view_host_->GetProcess()->GetID(),
                          pending_render_view_host_->GetRoutingID());
    }

    CommitPending();
    cross_navigation_pending_ = false;
  } else if (render_view_host == render_view_host_) {
    CancelPending();
    cross_navigation_pending_ = false;
  } else {
    DCHECK(false);
  }
}

void RenderViewHostManager::DidNavigateMainFrame(
    RenderViewHost* render_view_host) {
  if (!cross_navigation_pending_) {
    DCHECK(!pending_render_view_host_);

    DCHECK(render_view_host == render_view_host_);

    if (pending_web_ui())
      CommitPending();
    return;
  }

  if (render_view_host == pending_render_view_host_) {
    if (pending_render_view_host_->GetPendingRequestId() == -1) {
      OnCrossSiteResponse(pending_render_view_host_->GetProcess()->GetID(),
                          pending_render_view_host_->GetRoutingID());
    }

    CommitPending();
    cross_navigation_pending_ = false;
  } else if (render_view_host == render_view_host_) {
    CancelPending();
    cross_navigation_pending_ = false;
  } else {
    DCHECK(false);
  }
}
