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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1304943006: ProfileChooserVIew heap-use-after-free fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove un-needed import Created 5 years, 3 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/views/profiles/profile_chooser_view_browsertest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 // Do nothing. 2515 // Do nothing.
2516 break; 2516 break;
2517 } 2517 }
2518 #endif 2518 #endif
2519 } 2519 }
2520 2520
2521 void BrowserView::ShowAvatarBubbleFromAvatarButton( 2521 void BrowserView::ShowAvatarBubbleFromAvatarButton(
2522 AvatarBubbleMode mode, 2522 AvatarBubbleMode mode,
2523 const signin::ManageAccountsParams& manage_accounts_params) { 2523 const signin::ManageAccountsParams& manage_accounts_params) {
2524 #if defined(FRAME_AVATAR_BUTTON) 2524 #if defined(FRAME_AVATAR_BUTTON)
2525 // Do not show avatar bubble if there is no avatar menu button.
2526 if (!frame_->GetNewAvatarMenuButton())
2527 return;
2525 profiles::BubbleViewMode bubble_view_mode; 2528 profiles::BubbleViewMode bubble_view_mode;
2526 profiles::TutorialMode tutorial_mode; 2529 profiles::TutorialMode tutorial_mode;
2527 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, 2530 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode,
2528 &tutorial_mode); 2531 &tutorial_mode);
2529 ProfileChooserView::ShowBubble( 2532 ProfileChooserView::ShowBubble(
2530 bubble_view_mode, tutorial_mode, manage_accounts_params, 2533 bubble_view_mode, tutorial_mode, manage_accounts_params,
2531 frame_->GetNewAvatarMenuButton(), views::BubbleBorder::TOP_RIGHT, 2534 frame_->GetNewAvatarMenuButton(), views::BubbleBorder::TOP_RIGHT,
2532 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, browser()); 2535 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, browser());
2533 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); 2536 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE);
2534 #else 2537 #else
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 return immersive_mode_controller()->IsEnabled(); 2638 return immersive_mode_controller()->IsEnabled();
2636 } 2639 }
2637 2640
2638 views::Widget* BrowserView::GetBubbleAssociatedWidget() { 2641 views::Widget* BrowserView::GetBubbleAssociatedWidget() {
2639 return GetWidget(); 2642 return GetWidget();
2640 } 2643 }
2641 2644
2642 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { 2645 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() {
2643 return top_container_->GetBoundsInScreen(); 2646 return top_container_->GetBoundsInScreen();
2644 } 2647 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698