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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc

Issue 8552002: net: Move UnescapeRule into the net namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.cc ('k') | chrome/browser/ui/webui/fileicon_source.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/views/bookmarks/bookmark_editor_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_URL_LABEL)); 375 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_URL_LABEL));
376 376
377 std::string languages = 377 std::string languages =
378 profile_ ? profile_->GetPrefs()->GetString(prefs::kAcceptLanguages) 378 profile_ ? profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)
379 : std::string(); 379 : std::string();
380 // Because this gets parsed by FixupURL(), it's safe to omit the scheme or 380 // Because this gets parsed by FixupURL(), it's safe to omit the scheme or
381 // trailing slash, and unescape most characters, but we need to not drop any 381 // trailing slash, and unescape most characters, but we need to not drop any
382 // username/password, or unescape anything that changes the meaning. 382 // username/password, or unescape anything that changes the meaning.
383 string16 url_text = net::FormatUrl(url, languages, 383 string16 url_text = net::FormatUrl(url, languages,
384 net::kFormatUrlOmitAll & ~net::kFormatUrlOmitUsernamePassword, 384 net::kFormatUrlOmitAll & ~net::kFormatUrlOmitUsernamePassword,
385 UnescapeRule::SPACES, NULL, NULL, NULL); 385 net::UnescapeRule::SPACES, NULL, NULL, NULL);
386 386
387 url_tf_ = new views::Textfield; 387 url_tf_ = new views::Textfield;
388 url_tf_->SetText(UTF16ToWide(url_text)); 388 url_tf_->SetText(UTF16ToWide(url_text));
389 url_tf_->SetController(this); 389 url_tf_->SetController(this);
390 url_tf_->SetAccessibleName(url_label_->GetText()); 390 url_tf_->SetAccessibleName(url_label_->GetText());
391 391
392 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 392 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
393 393
394 layout->StartRow(0, labels_column_set_id); 394 layout->StartRow(0, labels_column_set_id);
395 layout->AddView(url_label_); 395 layout->AddView(url_label_);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 EditorNode* editor_node, 653 EditorNode* editor_node,
654 BookmarkExpandedStateTracker::Nodes* expanded_nodes) { 654 BookmarkExpandedStateTracker::Nodes* expanded_nodes) {
655 if (!tree_view_->IsExpanded(editor_node)) 655 if (!tree_view_->IsExpanded(editor_node))
656 return; 656 return;
657 657
658 if (editor_node->value != 0) // The root is 0 658 if (editor_node->value != 0) // The root is 0
659 expanded_nodes->insert(bb_model_->GetNodeByID(editor_node->value)); 659 expanded_nodes->insert(bb_model_->GetNodeByID(editor_node->value));
660 for (int i = 0; i < editor_node->child_count(); ++i) 660 for (int i = 0; i < editor_node->child_count(); ++i)
661 UpdateExpandedNodes(editor_node->GetChild(i), expanded_nodes); 661 UpdateExpandedNodes(editor_node->GetChild(i), expanded_nodes);
662 } 662 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.cc ('k') | chrome/browser/ui/webui/fileicon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698