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

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

Issue 1314953009: Refactor WebsiteSettings to operate on a SecurityInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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/frame/web_app_left_header_view_ash.h" 5 #include "chrome/browser/ui/views/frame/web_app_left_header_view_ash.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button.h" 7 #include "ash/frame/caption_buttons/frame_caption_button.h"
8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 content::WebContents* tab = browser_view_->GetActiveWebContents(); 83 content::WebContents* tab = browser_view_->GetActiveWebContents();
84 if (!tab) 84 if (!tab)
85 return; 85 return;
86 86
87 // Important to use GetVisibleEntry to match what's showing in the title area. 87 // Important to use GetVisibleEntry to match what's showing in the title area.
88 content::NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry(); 88 content::NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry();
89 // The visible entry can be NULL in the case of window.open(""). 89 // The visible entry can be NULL in the case of window.open("").
90 if (!nav_entry) 90 if (!nav_entry)
91 return; 91 return;
92 92
93 SecurityStateModel* security_model = SecurityStateModel::FromWebContents(tab);
94 DCHECK(security_model);
95
93 chrome::ShowWebsiteSettings(browser_view_->browser(), tab, 96 chrome::ShowWebsiteSettings(browser_view_->browser(), tab,
94 nav_entry->GetURL(), nav_entry->GetSSL()); 97 nav_entry->GetURL(),
98 security_model->GetSecurityInfo());
95 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698