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/webui/uber/uber_ui.cc

Issue 2409423005: Compare GURLs to kUrlConstants with .spec() and string equality (Closed)
Patch Set: rebase on dependent patch 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
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/webui/uber/uber_ui.h" 5 #include "chrome/browser/ui/webui/uber/uber_ui.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 10 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 SubframeLogger::SubframeLogger(content::WebContents* contents) 140 SubframeLogger::SubframeLogger(content::WebContents* contents)
141 : WebContentsObserver(contents) {} 141 : WebContentsObserver(contents) {}
142 142
143 SubframeLogger::~SubframeLogger() {} 143 SubframeLogger::~SubframeLogger() {}
144 144
145 void SubframeLogger::DidCommitProvisionalLoadForFrame( 145 void SubframeLogger::DidCommitProvisionalLoadForFrame(
146 content::RenderFrameHost* render_frame_host, 146 content::RenderFrameHost* render_frame_host,
147 const GURL& url, 147 const GURL& url,
148 ui::PageTransition transition_type) { 148 ui::PageTransition transition_type) {
149 if (url == GURL(chrome::kChromeUIExtensionsFrameURL) || 149 if (url == chrome::kChromeUIExtensionsFrameURL ||
150 url == GURL(chrome::kChromeUIHelpFrameURL) || 150 url == chrome::kChromeUIHelpFrameURL ||
151 url == GURL(chrome::kChromeUIHistoryFrameURL) || 151 url == chrome::kChromeUIHistoryFrameURL ||
152 url == GURL(chrome::kChromeUISettingsFrameURL) || 152 url == chrome::kChromeUISettingsFrameURL ||
153 url == GURL(chrome::kChromeUIUberFrameURL)) { 153 url == chrome::kChromeUIUberFrameURL) {
154 webui::LogWebUIUrl(url); 154 webui::LogWebUIUrl(url);
155 } 155 }
156 } 156 }
157 157
158 UberUI::UberUI(content::WebUI* web_ui) 158 UberUI::UberUI(content::WebUI* web_ui)
159 : WebUIController(web_ui), 159 : WebUIController(web_ui),
160 subframe_logger_(web_ui->GetWebContents()) { 160 subframe_logger_(web_ui->GetWebContents()) {
161 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), 161 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
162 CreateUberHTMLSource()); 162 CreateUberHTMLSource());
163 163
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // opens the default history page if one is uninstalled or disabled. 243 // opens the default history page if one is uninstalled or disabled.
244 UpdateHistoryNavigation(web_ui()); 244 UpdateHistoryNavigation(web_ui());
245 } 245 }
246 246
247 void UberFrameUI::OnExtensionUnloaded( 247 void UberFrameUI::OnExtensionUnloaded(
248 content::BrowserContext* browser_context, 248 content::BrowserContext* browser_context,
249 const extensions::Extension* extension, 249 const extensions::Extension* extension,
250 extensions::UnloadedExtensionInfo::Reason reason) { 250 extensions::UnloadedExtensionInfo::Reason reason) {
251 UpdateHistoryNavigation(web_ui()); 251 UpdateHistoryNavigation(web_ui());
252 } 252 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_impl.cc ('k') | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698