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

Side by Side Diff: chrome/browser/views/bookmark_editor_view.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/toolbar_model.cc ('k') | chrome/browser/views/url_picker.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/views/bookmark_editor_view.h" 5 #include "chrome/browser/views/bookmark_editor_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 title_label_ = new views::Label( 276 title_label_ = new views::Label(
277 l10n_util::GetString(IDS_BOOMARK_EDITOR_NAME_LABEL)); 277 l10n_util::GetString(IDS_BOOMARK_EDITOR_NAME_LABEL));
278 title_tf_.SetAccessibleName(title_label_->GetText()); 278 title_tf_.SetAccessibleName(title_label_->GetText());
279 279
280 std::wstring url_text; 280 std::wstring url_text;
281 if (details_.type == EditDetails::EXISTING_NODE) { 281 if (details_.type == EditDetails::EXISTING_NODE) {
282 std::wstring languages = profile_ 282 std::wstring languages = profile_
283 ? profile_->GetPrefs()->GetString(prefs::kAcceptLanguages) 283 ? profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)
284 : std::wstring(); 284 : std::wstring();
285 // The following URL is user-editable. We specify omit_username_password= 285 // The following URL is user-editable, so we don't strip anything from it.
286 // false and unescape=false to show the original URL except IDN.
287 url_text = net::FormatUrl(details_.existing_node->GetURL(), languages, 286 url_text = net::FormatUrl(details_.existing_node->GetURL(), languages,
288 false, UnescapeRule::NONE, NULL, NULL, NULL); 287 net::kFormatUrlOmitNothing, UnescapeRule::NONE, NULL, NULL, NULL);
289 } 288 }
290 url_tf_.SetText(url_text); 289 url_tf_.SetText(url_text);
291 url_tf_.SetController(this); 290 url_tf_.SetController(this);
292 291
293 url_label_ = new views::Label( 292 url_label_ = new views::Label(
294 l10n_util::GetString(IDS_BOOMARK_EDITOR_URL_LABEL)); 293 l10n_util::GetString(IDS_BOOMARK_EDITOR_URL_LABEL));
295 url_tf_.SetAccessibleName(url_label_->GetText()); 294 url_tf_.SetAccessibleName(url_label_->GetText());
296 295
297 if (show_tree_) { 296 if (show_tree_) {
298 tree_view_ = new views::TreeView(); 297 tree_view_ = new views::TreeView();
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 break; 572 break;
574 } 573 }
575 } 574 }
576 DCHECK(child_bb_node); 575 DCHECK(child_bb_node);
577 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle()); 576 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle());
578 } 577 }
579 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node, 578 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node,
580 parent_b_node, parent_bb_node); 579 parent_b_node, parent_bb_node);
581 } 580 }
582 } 581 }
OLDNEW
« no previous file with comments | « chrome/browser/toolbar_model.cc ('k') | chrome/browser/views/url_picker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698