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

Side by Side Diff: chrome/browser/ui/app_list/app_list_view_delegate.cc

Issue 720683003: App list: Added DCHECK for custom page when switching profiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/app_list/app_list_view_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "apps/custom_launcher_page_contents.h" 9 #include "apps/custom_launcher_page_contents.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 614
615 std::vector<views::View*> AppListViewDelegate::CreateCustomPageWebViews( 615 std::vector<views::View*> AppListViewDelegate::CreateCustomPageWebViews(
616 const gfx::Size& size) { 616 const gfx::Size& size) {
617 std::vector<views::View*> web_views; 617 std::vector<views::View*> web_views;
618 618
619 for (ScopedVector<apps::CustomLauncherPageContents>::const_iterator it = 619 for (ScopedVector<apps::CustomLauncherPageContents>::const_iterator it =
620 custom_page_contents_.begin(); 620 custom_page_contents_.begin();
621 it != custom_page_contents_.end(); 621 it != custom_page_contents_.end();
622 ++it) { 622 ++it) {
623 content::WebContents* web_contents = (*it)->web_contents(); 623 content::WebContents* web_contents = (*it)->web_contents();
624 // TODO(mgiuca): DCHECK_EQ(profile_, web_contents->GetBrowserContext()) 624
625 // after http://crbug.com/392763 resolved. 625 // The web contents should belong to the current profile.
626 DCHECK_EQ(profile_, web_contents->GetBrowserContext());
627
626 views::WebView* web_view = 628 views::WebView* web_view =
627 new views::WebView(web_contents->GetBrowserContext()); 629 new views::WebView(web_contents->GetBrowserContext());
628 web_view->SetPreferredSize(size); 630 web_view->SetPreferredSize(size);
629 web_view->SetWebContents(web_contents); 631 web_view->SetWebContents(web_contents);
630 web_views.push_back(web_view); 632 web_views.push_back(web_view);
631 } 633 }
632 634
633 return web_views; 635 return web_views;
634 } 636 }
635 #endif 637 #endif
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 697
696 // SigninManagerFactory is not a leaky singleton (unlike this class), and 698 // SigninManagerFactory is not a leaky singleton (unlike this class), and
697 // its destructor will check that it has no remaining observers. 699 // its destructor will check that it has no remaining observers.
698 scoped_observer_.RemoveAll(); 700 scoped_observer_.RemoveAll();
699 SigninManagerFactory::GetInstance()->RemoveObserver(this); 701 SigninManagerFactory::GetInstance()->RemoveObserver(this);
700 break; 702 break;
701 default: 703 default:
702 NOTREACHED(); 704 NOTREACHED();
703 } 705 }
704 } 706 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698