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

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

Issue 16625004: components: Move user_prefs into user_prefs namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 layout->StartRow(0, labels_column_set_id); 325 layout->StartRow(0, labels_column_set_id);
326 layout->AddView(title_label_); 326 layout->AddView(title_label_);
327 layout->AddView(title_tf_); 327 layout->AddView(title_tf_);
328 328
329 if (details_.GetNodeType() != BookmarkNode::FOLDER) { 329 if (details_.GetNodeType() != BookmarkNode::FOLDER) {
330 url_label_ = new views::Label( 330 url_label_ = new views::Label(
331 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_URL_LABEL)); 331 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_URL_LABEL));
332 332
333 url_tf_ = new views::Textfield; 333 url_tf_ = new views::Textfield;
334 PrefService* prefs = profile_ ? 334 PrefService* prefs =
335 components::UserPrefs::Get(profile_) : 335 profile_ ? user_prefs::UserPrefs::Get(profile_) : NULL;
336 NULL;
337 url_tf_->SetText(chrome::FormatBookmarkURLForDisplay(url, prefs)); 336 url_tf_->SetText(chrome::FormatBookmarkURLForDisplay(url, prefs));
338 url_tf_->SetController(this); 337 url_tf_->SetController(this);
339 url_tf_->SetAccessibleName(url_label_->text()); 338 url_tf_->SetAccessibleName(url_label_->text());
340 339
341 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 340 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
342 341
343 layout->StartRow(0, labels_column_set_id); 342 layout->StartRow(0, labels_column_set_id);
344 layout->AddView(url_label_); 343 layout->AddView(url_label_);
345 layout->AddView(url_tf_); 344 layout->AddView(url_tf_);
346 } 345 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM); 621 IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM);
623 } 622 }
624 return context_menu_model_.get(); 623 return context_menu_model_.get();
625 } 624 }
626 625
627 void BookmarkEditorView::EditorTreeModel::SetTitle(ui::TreeModelNode* node, 626 void BookmarkEditorView::EditorTreeModel::SetTitle(ui::TreeModelNode* node,
628 const string16& title) { 627 const string16& title) {
629 if (!title.empty()) 628 if (!title.empty())
630 ui::TreeNodeModel<EditorNode>::SetTitle(node, title); 629 ui::TreeNodeModel<EditorNode>::SetTitle(node, title);
631 } 630 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc ('k') | chrome/browser/ui/views/home_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698