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

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 140343002: extensions: Relocate pref name constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing include for mac Created 6 years, 11 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/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/chrome_notification_types.h" 11 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/first_run/first_run.h" 12 #include "chrome/browser/first_run/first_run.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/sync/profile_sync_service.h" 14 #include "chrome/browser/sync/profile_sync_service.h"
15 #include "chrome/browser/sync/profile_sync_service_factory.h" 15 #include "chrome/browser/sync/profile_sync_service_factory.h"
16 #include "chrome/browser/sync/sync_prefs.h" 16 #include "chrome/browser/sync/sync_prefs.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "components/user_prefs/pref_registry_syncable.h" 18 #include "components/user_prefs/pref_registry_syncable.h"
19 #include "content/public/browser/notification_service.h" 19 #include "content/public/browser/notification_service.h"
20 #include "content/public/browser/notification_source.h" 20 #include "content/public/browser/notification_source.h"
21 #include "content/public/browser/web_contents.h" 21 #include "content/public/browser/web_contents.h"
22 #include "content/public/browser/web_ui.h" 22 #include "content/public/browser/web_ui.h"
23 #include "extensions/browser/pref_names.h"
23 24
24 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
25 #include "base/command_line.h" 26 #include "base/command_line.h"
26 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
27 #include "chromeos/chromeos_switches.h" 28 #include "chromeos/chromeos_switches.h"
28 #endif 29 #endif
29 30
30 Profile::Profile() 31 Profile::Profile()
31 : restored_last_session_(false), 32 : restored_last_session_(false),
32 sent_destroyed_notification_(false), 33 sent_destroyed_notification_(false),
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 registry->RegisterBooleanPref( 88 registry->RegisterBooleanPref(
88 prefs::kGoogleGeolocationAccessEnabled, 89 prefs::kGoogleGeolocationAccessEnabled,
89 false, 90 false,
90 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 91 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
91 #endif 92 #endif
92 registry->RegisterBooleanPref( 93 registry->RegisterBooleanPref(
93 prefs::kDisableExtensions, 94 prefs::kDisableExtensions,
94 false, 95 false,
95 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 96 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
96 registry->RegisterBooleanPref( 97 registry->RegisterBooleanPref(
97 prefs::kExtensionAlertsInitializedPref, 98 extensions::pref_names::kAlertsInitialized,
98 false, 99 false,
99 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 100 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
100 registry->RegisterStringPref( 101 registry->RegisterStringPref(
101 prefs::kSelectFileLastDirectory, 102 prefs::kSelectFileLastDirectory,
102 std::string(), 103 std::string(),
103 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 104 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
104 registry->RegisterDoublePref( 105 registry->RegisterDoublePref(
105 prefs::kDefaultZoomLevel, 106 prefs::kDefaultZoomLevel,
106 0.0, 107 0.0,
107 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 108 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 void Profile::MaybeSendDestroyedNotification() { 201 void Profile::MaybeSendDestroyedNotification() {
201 if (!sent_destroyed_notification_) { 202 if (!sent_destroyed_notification_) {
202 sent_destroyed_notification_ = true; 203 sent_destroyed_notification_ = true;
203 content::NotificationService::current()->Notify( 204 content::NotificationService::current()->Notify(
204 chrome::NOTIFICATION_PROFILE_DESTROYED, 205 chrome::NOTIFICATION_PROFILE_DESTROYED,
205 content::Source<Profile>(this), 206 content::Source<Profile>(this),
206 content::NotificationService::NoDetails()); 207 content::NotificationService::NoDetails());
207 } 208 }
208 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698