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

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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
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/bookmarks/bookmark_utils.h" 5 #include "chrome/browser/bookmarks/bookmark_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 if (new_parent != node->parent()) 314 if (new_parent != node->parent())
315 model->Move(node, new_parent, new_parent->child_count()); 315 model->Move(node, new_parent, new_parent->child_count());
316 if (node->is_url()) 316 if (node->is_url())
317 model->SetURL(node, new_url); 317 model->SetURL(node, new_url);
318 model->SetTitle(node, new_title); 318 model->SetTitle(node, new_title);
319 319
320 return node; 320 return node;
321 } 321 }
322 322
323 void RegisterUserPrefs(PrefRegistrySyncable* registry) { 323 void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
324 registry->RegisterBooleanPref(prefs::kShowBookmarkBar, 324 registry->RegisterBooleanPref(
325 false, 325 prefs::kShowBookmarkBar,
326 PrefRegistrySyncable::SYNCABLE_PREF); 326 false,
327 registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, 327 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
328 true, 328 registry->RegisterBooleanPref(
329 PrefRegistrySyncable::UNSYNCABLE_PREF); 329 prefs::kEditBookmarksEnabled,
330 registry->RegisterBooleanPref(prefs::kShowAppsShortcutInBookmarkBar, 330 true,
331 true, 331 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
332 PrefRegistrySyncable::SYNCABLE_PREF); 332 registry->RegisterBooleanPref(
333 prefs::kShowAppsShortcutInBookmarkBar,
334 true,
335 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
333 } 336 }
334 337
335 const BookmarkNode* GetParentForNewNodes( 338 const BookmarkNode* GetParentForNewNodes(
336 const BookmarkNode* parent, 339 const BookmarkNode* parent,
337 const std::vector<const BookmarkNode*>& selection, 340 const std::vector<const BookmarkNode*>& selection,
338 int* index) { 341 int* index) {
339 const BookmarkNode* real_parent = parent; 342 const BookmarkNode* real_parent = parent;
340 343
341 if (selection.size() == 1 && selection[0]->is_folder()) 344 if (selection.size() == 1 && selection[0]->is_folder())
342 real_parent = selection[0]; 345 real_parent = selection[0];
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 414 }
412 415
413 void RecordAppsPageOpen(BookmarkLaunchLocation location) { 416 void RecordAppsPageOpen(BookmarkLaunchLocation location) {
414 if (location == LAUNCH_DETACHED_BAR || location == LAUNCH_ATTACHED_BAR) { 417 if (location == LAUNCH_DETACHED_BAR || location == LAUNCH_ATTACHED_BAR) {
415 content::RecordAction( 418 content::RecordAction(
416 UserMetricsAction("ClickedBookmarkBarAppsShortcutButton")); 419 UserMetricsAction("ClickedBookmarkBarAppsShortcutButton"));
417 } 420 }
418 } 421 }
419 422
420 } // namespace bookmark_utils 423 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.h ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698