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

Side by Side Diff: chrome/browser/toolbar_model.cc

Issue 372017: Fix various problems with inline autocomplete and URLs that change length dur... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/toolbar_model.h" 5 #include "chrome/browser/toolbar_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/cert_store.h" 8 #include "chrome/browser/cert_store.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/browser/ssl/ssl_error_info.h" 10 #include "chrome/browser/ssl/ssl_error_info.h"
11 #include "chrome/browser/tab_contents/navigation_controller.h" 11 #include "chrome/browser/tab_contents/navigation_controller.h"
(...skipping 22 matching lines...) Expand all
34 prefs::kAcceptLanguages); 34 prefs::kAcceptLanguages);
35 NavigationEntry* entry = navigation_controller->GetActiveEntry(); 35 NavigationEntry* entry = navigation_controller->GetActiveEntry();
36 // We may not have a navigation entry yet 36 // We may not have a navigation entry yet
37 if (!navigation_controller->tab_contents()->ShouldDisplayURL()) { 37 if (!navigation_controller->tab_contents()->ShouldDisplayURL()) {
38 // Explicitly hide the URL for this tab. 38 // Explicitly hide the URL for this tab.
39 url = GURL(); 39 url = GURL();
40 } else if (entry) { 40 } else if (entry) {
41 url = entry->virtual_url(); 41 url = entry->virtual_url();
42 } 42 }
43 } 43 }
44 return net::FormatUrl(url, languages, true, UnescapeRule::NORMAL, NULL, NULL); 44 return net::FormatUrl(url, languages, true, UnescapeRule::NORMAL, NULL, NULL,
45 NULL);
45 } 46 }
46 47
47 ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() { 48 ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() {
48 if (input_in_progress_) // When editing, assume no security style. 49 if (input_in_progress_) // When editing, assume no security style.
49 return ToolbarModel::NORMAL; 50 return ToolbarModel::NORMAL;
50 51
51 NavigationController* navigation_controller = GetNavigationController(); 52 NavigationController* navigation_controller = GetNavigationController();
52 if (!navigation_controller) // We might not have a controller on init. 53 if (!navigation_controller) // We might not have a controller on init.
53 return ToolbarModel::NORMAL; 54 return ToolbarModel::NORMAL;
54 55
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Multiple errors. 206 // Multiple errors.
206 text->assign(l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS)); 207 text->assign(l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS));
207 text->append(L"\n"); 208 text->append(L"\n");
208 for (int i = 0; i < error_count; ++i) { 209 for (int i = 0; i < error_count; ++i) {
209 text->append(errors[i].short_description()); 210 text->append(errors[i].short_description());
210 if (i != error_count - 1) 211 if (i != error_count - 1)
211 text->append(L"\n"); 212 text->append(L"\n");
212 } 213 }
213 } 214 }
214 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698