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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 const std::string& languages) { 231 const std::string& languages) {
232 std::vector<string16> words; 232 std::vector<string16> words;
233 QueryParser parser; 233 QueryParser parser;
234 parser.ParseQueryWords(base::i18n::ToLower(text), &words); 234 parser.ParseQueryWords(base::i18n::ToLower(text), &words);
235 if (words.empty()) 235 if (words.empty())
236 return false; 236 return false;
237 237
238 return (node->is_url() && DoesBookmarkContainWords(node, words, languages)); 238 return (node->is_url() && DoesBookmarkContainWords(node, words, languages));
239 } 239 }
240 240
241 void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) { 241 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
242 registry->RegisterBooleanPref( 242 registry->RegisterBooleanPref(
243 prefs::kShowBookmarkBar, 243 prefs::kShowBookmarkBar,
244 false, 244 false,
245 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 245 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
246 registry->RegisterBooleanPref( 246 registry->RegisterBooleanPref(
247 prefs::kEditBookmarksEnabled, 247 prefs::kEditBookmarksEnabled,
248 true, 248 true,
249 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 249 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
250 registry->RegisterBooleanPref( 250 registry->RegisterBooleanPref(
251 prefs::kShowAppsShortcutInBookmarkBar, 251 prefs::kShowAppsShortcutInBookmarkBar,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 333
334 void RecordAppsPageOpen(BookmarkLaunchLocation location) { 334 void RecordAppsPageOpen(BookmarkLaunchLocation location) {
335 if (location == LAUNCH_DETACHED_BAR || location == LAUNCH_ATTACHED_BAR) { 335 if (location == LAUNCH_DETACHED_BAR || location == LAUNCH_ATTACHED_BAR) {
336 content::RecordAction( 336 content::RecordAction(
337 UserMetricsAction("ClickedBookmarkBarAppsShortcutButton")); 337 UserMetricsAction("ClickedBookmarkBarAppsShortcutButton"));
338 } 338 }
339 } 339 }
340 340
341 } // namespace bookmark_utils 341 } // 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