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

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

Issue 83001: ImportantFileWriter (Closed)
Patch Set: share more code Created 11 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
« no previous file with comments | « base/file_util_win.cc ('k') | chrome/browser/browser_main.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/bookmarks/bookmark_drag_data.h" 10 #include "chrome/browser/bookmarks/bookmark_drag_data.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 return (node->is_url() && DoesBookmarkContainWords(node, words)); 531 return (node->is_url() && DoesBookmarkContainWords(node, words));
532 } 532 }
533 533
534 // Formerly in BookmarkBarView 534 // Formerly in BookmarkBarView
535 void ToggleWhenVisible(Profile* profile) { 535 void ToggleWhenVisible(Profile* profile) {
536 PrefService* prefs = profile->GetPrefs(); 536 PrefService* prefs = profile->GetPrefs();
537 const bool always_show = !prefs->GetBoolean(prefs::kShowBookmarkBar); 537 const bool always_show = !prefs->GetBoolean(prefs::kShowBookmarkBar);
538 538
539 // The user changed when the bookmark bar is shown, update the preferences. 539 // The user changed when the bookmark bar is shown, update the preferences.
540 prefs->SetBoolean(prefs::kShowBookmarkBar, always_show); 540 prefs->SetBoolean(prefs::kShowBookmarkBar, always_show);
541 prefs->ScheduleSavePersistentPrefs(g_browser_process->file_thread()); 541 prefs->ScheduleSavePersistentPrefs();
542 542
543 // And notify the notification service. 543 // And notify the notification service.
544 Source<Profile> source(profile); 544 Source<Profile> source(profile);
545 NotificationService::current()->Notify( 545 NotificationService::current()->Notify(
546 NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, 546 NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
547 source, 547 source,
548 NotificationService::NoDetails()); 548 NotificationService::NoDetails());
549 } 549 }
550 550
551 void RegisterUserPrefs(PrefService* prefs) { 551 void RegisterUserPrefs(PrefService* prefs) {
552 // Formerly in BookmarkBarView 552 // Formerly in BookmarkBarView
553 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, false); 553 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, false);
554 554
555 // Formerly in BookmarkTableView 555 // Formerly in BookmarkTableView
556 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth1, -1); 556 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth1, -1);
557 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth1, -1); 557 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth1, -1);
558 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth2, -1); 558 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth2, -1);
559 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth2, -1); 559 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth2, -1);
560 prefs->RegisterIntegerPref(prefs::kBookmarkTablePathWidth, -1); 560 prefs->RegisterIntegerPref(prefs::kBookmarkTablePathWidth, -1);
561 } 561 }
562 562
563 } // namespace bookmark_utils 563 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « base/file_util_win.cc ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698