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

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: Cleanup. Created 7 years, 11 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/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/autocomplete/autocomplete_input.h" 8 #include "chrome/browser/autocomplete/autocomplete_input.h"
9 #include "chrome/browser/google/google_util.h" 9 #include "chrome/browser/google/google_util.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return !web_contents->GetWebUIForCurrentState()->ShouldHideURL(); 107 return !web_contents->GetWebUIForCurrentState()->ShouldHideURL();
108 108
109 if (entry && entry->GetURL().SchemeIs(extensions::kExtensionScheme)) 109 if (entry && entry->GetURL().SchemeIs(extensions::kExtensionScheme))
110 return false; 110 return false;
111 111
112 #if defined(OS_CHROMEOS) 112 #if defined(OS_CHROMEOS)
113 if (entry && entry->GetURL().SchemeIs(chrome::kDriveScheme)) 113 if (entry && entry->GetURL().SchemeIs(chrome::kDriveScheme))
114 return false; 114 return false;
115 #endif 115 #endif
116 116
117 if (entry && entry->GetVirtualURL() == GURL(chrome::kChromeUINewTabURL))
118 return false;
119
117 return true; 120 return true;
118 } 121 }
119 122
120 ToolbarModelImpl::SecurityLevel ToolbarModelImpl::GetSecurityLevel() const { 123 ToolbarModelImpl::SecurityLevel ToolbarModelImpl::GetSecurityLevel() const {
121 if (input_in_progress_) // When editing, assume no security style. 124 if (input_in_progress_) // When editing, assume no security style.
122 return NONE; 125 return NONE;
123 126
124 NavigationController* navigation_controller = GetNavigationController(); 127 NavigationController* navigation_controller = GetNavigationController();
125 if (!navigation_controller) // We might not have a controller on init. 128 if (!navigation_controller) // We might not have a controller on init.
126 return NONE; 129 return NONE;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 template_url->ExtractSearchTermsFromURL(url, &result); 234 template_url->ExtractSearchTermsFromURL(url, &result);
232 return result; 235 return result;
233 } 236 }
234 237
235 Profile* ToolbarModelImpl::GetProfile() const { 238 Profile* ToolbarModelImpl::GetProfile() const {
236 NavigationController* navigation_controller = GetNavigationController(); 239 NavigationController* navigation_controller = GetNavigationController();
237 return navigation_controller ? 240 return navigation_controller ?
238 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) : 241 Profile::FromBrowserContext(navigation_controller->GetBrowserContext()) :
239 NULL; 242 NULL;
240 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698