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

Side by Side Diff: chrome/browser/android/new_tab_page_prefs.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/new_tab_page_prefs.h" 5 #include "chrome/browser/android/new_tab_page_prefs.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 DictionaryPrefUpdate update(prefs, prefs::kNtpCollapsedForeignSessions); 101 DictionaryPrefUpdate update(prefs, prefs::kNtpCollapsedForeignSessions);
102 if (is_collapsed) 102 if (is_collapsed)
103 update.Get()->SetBoolean(ConvertJavaStringToUTF8(env, session_tag), true); 103 update.Get()->SetBoolean(ConvertJavaStringToUTF8(env, session_tag), true);
104 else 104 else
105 update.Get()->Remove(ConvertJavaStringToUTF8(env, session_tag), NULL); 105 update.Get()->Remove(ConvertJavaStringToUTF8(env, session_tag), NULL);
106 } 106 }
107 107
108 // static 108 // static
109 void NewTabPagePrefs::RegisterProfilePrefs( 109 void NewTabPagePrefs::RegisterProfilePrefs(
110 user_prefs::PrefRegistrySyncable* registry) { 110 user_prefs::PrefRegistrySyncable* registry) {
111 registry->RegisterBooleanPref( 111 registry->RegisterBooleanPref(prefs::kNtpCollapsedCurrentlyOpenTabs, false);
112 prefs::kNtpCollapsedCurrentlyOpenTabs, 112 registry->RegisterBooleanPref(prefs::kNtpCollapsedSnapshotDocument, false);
113 false, 113 registry->RegisterBooleanPref(prefs::kNtpCollapsedRecentlyClosedTabs, false);
114 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 114 registry->RegisterBooleanPref(prefs::kNtpCollapsedSyncPromo, false);
115 registry->RegisterBooleanPref( 115 registry->RegisterDictionaryPref(prefs::kNtpCollapsedForeignSessions);
116 prefs::kNtpCollapsedSnapshotDocument, 116 registry->RegisterDictionaryPref(prefs::kNtpMostVisitedURLsBlacklist);
117 false,
118 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
119 registry->RegisterBooleanPref(
120 prefs::kNtpCollapsedRecentlyClosedTabs,
121 false,
122 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
123 registry->RegisterBooleanPref(
124 prefs::kNtpCollapsedSyncPromo,
125 false,
126 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
127 registry->RegisterDictionaryPref(
128 prefs::kNtpCollapsedForeignSessions,
129 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
130 registry->RegisterDictionaryPref(
131 prefs::kNtpMostVisitedURLsBlacklist,
132 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
133 } 117 }
134 118
135 // static 119 // static
136 bool NewTabPagePrefs::RegisterNewTabPagePrefs(JNIEnv* env) { 120 bool NewTabPagePrefs::RegisterNewTabPagePrefs(JNIEnv* env) {
137 return RegisterNativesImpl(env); 121 return RegisterNativesImpl(env);
138 } 122 }
OLDNEW
« no previous file with comments | « chrome/browser/android/bookmarks/partner_bookmarks_shim.cc ('k') | chrome/browser/apps/drive/drive_app_mapping.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698