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

Side by Side Diff: chrome/browser/ui/views/profiles/user_manager_view.cc

Issue 2392953002: Display signin dialog for the default profile after the last profile being deleted. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/profile_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/ui/views/profiles/user_manager_view.h" 5 #include "chrome/browser/ui/views/profiles/user_manager_view.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 DCHECK(!instance_); 281 DCHECK(!instance_);
282 instance_ = instance.release(); // |instance_| takes over ownership. 282 instance_ = instance.release(); // |instance_| takes over ownership.
283 instance_->Init(system_profile, GURL(url)); 283 instance_->Init(system_profile, GURL(url));
284 } 284 }
285 285
286 void UserManagerView::ShowReauthDialog(content::BrowserContext* browser_context, 286 void UserManagerView::ShowReauthDialog(content::BrowserContext* browser_context,
287 const std::string& email, 287 const std::string& email,
288 signin_metrics::Reason reason) { 288 signin_metrics::Reason reason) {
289 HideReauthDialog(); 289 HideReauthDialog();
290 // if there is no |browser_context| provided, using the one belongs to the
291 // UserManagerView.
292 if (browser_context == nullptr)
sky 2016/10/04 18:22:27 This seems wrong to me. How is it that web_view_ w
293 browser_context = web_view_->browser_context();
290 // The dialog delegate will be deleted when the widget closes. The created 294 // The dialog delegate will be deleted when the widget closes. The created
291 // WebView's lifetime is managed by the delegate. 295 // WebView's lifetime is managed by the delegate.
292 delegate_ = new ReauthDelegate(this, 296 delegate_ = new ReauthDelegate(this,
293 new views::WebView(browser_context), 297 new views::WebView(browser_context),
294 email, 298 email,
295 reason); 299 reason);
296 gfx::NativeView parent = instance_->GetWidget()->GetNativeView(); 300 gfx::NativeView parent = instance_->GetWidget()->GetNativeView();
297 views::DialogDelegate::CreateDialogWidget(delegate_, nullptr, parent); 301 views::DialogDelegate::CreateDialogWidget(delegate_, nullptr, parent);
298 delegate_->GetWidget()->Show(); 302 delegate_->GetWidget()->Show();
299 } 303 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 delegate_->DisplayErrorMessage(); 442 delegate_->DisplayErrorMessage();
439 } 443 }
440 444
441 void UserManagerView::SetSigninProfilePath(const base::FilePath& profile_path) { 445 void UserManagerView::SetSigninProfilePath(const base::FilePath& profile_path) {
442 signin_profile_path_ = profile_path; 446 signin_profile_path_ = profile_path;
443 } 447 }
444 448
445 base::FilePath UserManagerView::GetSigninProfilePath() { 449 base::FilePath UserManagerView::GetSigninProfilePath() {
446 return signin_profile_path_; 450 return signin_profile_path_;
447 } 451 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/profile_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698