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

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

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 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"
11 #include "base/prefs/scoped_user_pref_update.h" 11 #include "base/prefs/scoped_user_pref_update.h"
12 #include "chrome/browser/profiles/profile_android.h" 12 #include "chrome/browser/profiles/profile_android.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "components/user_prefs/pref_registry_syncable.h" 14 #include "components/pref_registry/pref_registry_syncable.h"
15 #include "jni/NewTabPagePrefs_jni.h" 15 #include "jni/NewTabPagePrefs_jni.h"
16 16
17 using base::android::ConvertJavaStringToUTF8; 17 using base::android::ConvertJavaStringToUTF8;
18 18
19 static jlong Init(JNIEnv* env, jclass clazz, jobject profile) { 19 static jlong Init(JNIEnv* env, jclass clazz, jobject profile) {
20 NewTabPagePrefs* new_tab_page_prefs = 20 NewTabPagePrefs* new_tab_page_prefs =
21 new NewTabPagePrefs(ProfileAndroid::FromProfileAndroid(profile)); 21 new NewTabPagePrefs(ProfileAndroid::FromProfileAndroid(profile));
22 return reinterpret_cast<intptr_t>(new_tab_page_prefs); 22 return reinterpret_cast<intptr_t>(new_tab_page_prefs);
23 } 23 }
24 24
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 112 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
113 registry->RegisterDictionaryPref( 113 registry->RegisterDictionaryPref(
114 prefs::kNtpMostVisitedURLsBlacklist, 114 prefs::kNtpMostVisitedURLsBlacklist,
115 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 115 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
116 } 116 }
117 117
118 // static 118 // static
119 bool NewTabPagePrefs::RegisterNewTabPagePrefs(JNIEnv* env) { 119 bool NewTabPagePrefs::RegisterNewTabPagePrefs(JNIEnv* env) {
120 return RegisterNativesImpl(env); 120 return RegisterNativesImpl(env);
121 } 121 }
OLDNEW
« no previous file with comments | « chrome/browser/android/bookmarks/partner_bookmarks_shim.cc ('k') | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698