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

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

Issue 1513023: Strips http from omnibox (and a couple of other places) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/url_fixer_upper.cc ('k') | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/cert_store.h" 9 #include "chrome/browser/cert_store.h"
10 #include "chrome/browser/pref_service.h" 10 #include "chrome/browser/pref_service.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 url = entry->virtual_url(); 46 url = entry->virtual_url();
47 } 47 }
48 } 48 }
49 if (url.spec().length() > chrome::kMaxURLDisplayChars) { 49 if (url.spec().length() > chrome::kMaxURLDisplayChars) {
50 if (url.IsStandard()) { 50 if (url.IsStandard()) {
51 url = url.GetOrigin(); 51 url = url.GetOrigin();
52 } else { 52 } else {
53 url = GURL(url.scheme() + ":"); 53 url = GURL(url.scheme() + ":");
54 } 54 }
55 } 55 }
56 return net::FormatUrl(url, languages, true, UnescapeRule::NORMAL, NULL, NULL, 56 return net::FormatUrl(url, languages, net::kFormatUrlOmitAll,
57 NULL); 57 UnescapeRule::NORMAL, NULL, NULL, NULL);
58 } 58 }
59 59
60 ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const { 60 ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const {
61 if (input_in_progress_) // When editing, assume no security style. 61 if (input_in_progress_) // When editing, assume no security style.
62 return NONE; 62 return NONE;
63 63
64 NavigationController* navigation_controller = GetNavigationController(); 64 NavigationController* navigation_controller = GetNavigationController();
65 if (!navigation_controller) // We might not have a controller on init. 65 if (!navigation_controller) // We might not have a controller on init.
66 return NONE; 66 return NONE;
67 67
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 *text = errors[0].short_description(); 197 *text = errors[0].short_description();
198 } else { 198 } else {
199 // Multiple errors. 199 // Multiple errors.
200 *text = l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS); 200 *text = l10n_util::GetString(IDS_SEVERAL_SSL_ERRORS);
201 for (size_t i = 0; i < errors.size(); ++i) { 201 for (size_t i = 0; i < errors.size(); ++i) {
202 text->append(L"\n"); 202 text->append(L"\n");
203 text->append(errors[i].short_description()); 203 text->append(errors[i].short_description());
204 } 204 }
205 } 205 }
206 } 206 }
OLDNEW
« no previous file with comments | « chrome/browser/net/url_fixer_upper.cc ('k') | chrome/browser/views/bookmark_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698