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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the previous fix Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 BrowserThread::PostTask(BrowserThread::FILE, 248 BrowserThread::PostTask(BrowserThread::FILE,
249 FROM_HERE, 249 FROM_HERE,
250 NewRunnableFunction(&file_util::CreateDirectory, 250 NewRunnableFunction(&file_util::CreateDirectory,
251 path)); 251 path));
252 // Async version. 252 // Async version.
253 return new ProfileImpl(path, delegate); 253 return new ProfileImpl(path, delegate);
254 } 254 }
255 255
256 // static 256 // static
257 void ProfileImpl::RegisterUserPrefs(PrefService* prefs) { 257 void ProfileImpl::RegisterUserPrefs(PrefService* prefs) {
258 prefs->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, false); 258 prefs->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled,
259 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false); 259 false,
260 false /* don't sync pref */);
261 prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit,
262 false,
263 true /* sync pref */);
260 } 264 }
261 265
262 ProfileImpl::ProfileImpl(const FilePath& path, 266 ProfileImpl::ProfileImpl(const FilePath& path,
263 Profile::Delegate* delegate) 267 Profile::Delegate* delegate)
264 : path_(path), 268 : path_(path),
265 visited_link_event_listener_(new VisitedLinkEventListener()), 269 visited_link_event_listener_(new VisitedLinkEventListener()),
266 extension_devtools_manager_(NULL), 270 extension_devtools_manager_(NULL),
267 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)), 271 ALLOW_THIS_IN_INITIALIZER_LIST(io_data_(this)),
268 host_content_settings_map_(NULL), 272 host_content_settings_map_(NULL),
269 host_zoom_map_(NULL), 273 host_zoom_map_(NULL),
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 return pref_proxy_config_tracker_; 1563 return pref_proxy_config_tracker_;
1560 } 1564 }
1561 1565
1562 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { 1566 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() {
1563 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 1567 if (!prerender::PrerenderManager::IsPrerenderingPossible())
1564 return NULL; 1568 return NULL;
1565 if (!prerender_manager_.get()) 1569 if (!prerender_manager_.get())
1566 prerender_manager_.reset(new prerender::PrerenderManager(this)); 1570 prerender_manager_.reset(new prerender::PrerenderManager(this));
1567 return prerender_manager_.get(); 1571 return prerender_manager_.get();
1568 } 1572 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698