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

Side by Side Diff: chrome/browser/chromeos/login/captive_portal_window_proxy.cc

Issue 13633003: Part of multiprofile implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 7 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/login/captive_portal_window_proxy.h" 5 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
6 6
7 #include "chrome/browser/chromeos/login/captive_portal_view.h" 7 #include "chrome/browser/chromeos/login/captive_portal_view.h"
8 #include "chrome/browser/chromeos/login/helper.h" 8 #include "chrome/browser/chromeos/login/helper.h"
9 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" 9 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/chromeos/profiles/profile_helper.h"
11 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
12 12
13 namespace { 13 namespace {
14 14
15 int kMargin = 50; 15 int kMargin = 50;
16 16
17 } // namespace 17 } // namespace
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
(...skipping 18 matching lines...) Expand all
39 if (captive_portal_view_.get()) { 39 if (captive_portal_view_.get()) {
40 NOTREACHED(); 40 NOTREACHED();
41 } 41 }
42 // Dialog is already shown, no need to reload. 42 // Dialog is already shown, no need to reload.
43 return; 43 return;
44 } 44 }
45 45
46 // Dialog is not initialized yet. 46 // Dialog is not initialized yet.
47 if (!captive_portal_view_.get()) { 47 if (!captive_portal_view_.get()) {
48 captive_portal_view_.reset( 48 captive_portal_view_.reset(
49 new CaptivePortalView(ProfileManager::GetDefaultProfile(), this)); 49 new CaptivePortalView(ProfileHelper::GetSigninProfile(), this));
50 } 50 }
51 51
52 // If dialog has been created (but not shown) previously, force reload. 52 // If dialog has been created (but not shown) previously, force reload.
53 captive_portal_view_->StartLoad(); 53 captive_portal_view_->StartLoad();
54 } 54 }
55 55
56 void CaptivePortalWindowProxy::Show() { 56 void CaptivePortalWindowProxy::Show() {
57 if (ProxySettingsDialog::IsShown()) { 57 if (ProxySettingsDialog::IsShown()) {
58 // ProxySettingsDialog is being shown, don't cover it. 58 // ProxySettingsDialog is being shown, don't cover it.
59 Close(); 59 Close();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 void CaptivePortalWindowProxy::OnWidgetDestroying(views::Widget* widget) { 99 void CaptivePortalWindowProxy::OnWidgetDestroying(views::Widget* widget) {
100 DCHECK(widget == widget_); 100 DCHECK(widget == widget_);
101 DCHECK(captive_portal_view_.get() == NULL); 101 DCHECK(captive_portal_view_.get() == NULL);
102 widget->RemoveObserver(this); 102 widget->RemoveObserver(this);
103 widget_ = NULL; 103 widget_ = NULL;
104 } 104 }
105 105
106 } // namespace chromeos 106 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/base_login_display_host.cc ('k') | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698