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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_model_impl.cc

Issue 11824050: InstantExtended: Committed NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 7 years, 10 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 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/toolbar/toolbar_model_impl.h" 5 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/autocomplete/autocomplete_input.h" 9 #include "chrome/browser/autocomplete/autocomplete_input.h"
10 #include "chrome/browser/google/google_util.h" 10 #include "chrome/browser/google/google_util.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 return !web_contents->GetWebUIForCurrentState()->ShouldHideURL(); 129 return !web_contents->GetWebUIForCurrentState()->ShouldHideURL();
130 130
131 if (entry && entry->GetURL().SchemeIs(extensions::kExtensionScheme)) 131 if (entry && entry->GetURL().SchemeIs(extensions::kExtensionScheme))
132 return false; 132 return false;
133 133
134 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
135 if (entry && entry->GetURL().SchemeIs(chrome::kDriveScheme)) 135 if (entry && entry->GetURL().SchemeIs(chrome::kDriveScheme))
136 return false; 136 return false;
137 #endif 137 #endif
138 138
139 if (entry && entry->GetVirtualURL() == GURL(chrome::kChromeUINewTabURL))
140 return false;
141
139 return true; 142 return true;
140 } 143 }
141 144
142 ToolbarModelImpl::SecurityLevel ToolbarModelImpl::GetSecurityLevel() const { 145 ToolbarModelImpl::SecurityLevel ToolbarModelImpl::GetSecurityLevel() const {
143 if (input_in_progress_) // When editing, assume no security style. 146 if (input_in_progress_) // When editing, assume no security style.
144 return NONE; 147 return NONE;
145 148
146 NavigationController* navigation_controller = GetNavigationController(); 149 NavigationController* navigation_controller = GetNavigationController();
147 if (!navigation_controller) // We might not have a controller on init. 150 if (!navigation_controller) // We might not have a controller on init.
148 return NONE; 151 return NONE;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 template_url->ExtractSearchTermsFromURL(url, &result); 264 template_url->ExtractSearchTermsFromURL(url, &result);
262 return result; 265 return result;
263 } 266 }
264 267
265 Profile* ToolbarModelImpl::GetProfile() const { 268 Profile* ToolbarModelImpl::GetProfile() const {
266 NavigationController* navigation_controller = GetNavigationController(); 269 NavigationController* navigation_controller = GetNavigationController();
267 return navigation_controller ? 270 return navigation_controller ?
268 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) : 271 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) :
269 NULL; 272 NULL;
270 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698