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

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

Issue 6262010: Revert 72225 - This patch moves the experiments settings from the user profil... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | no next file » | 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) 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/environment.h" 8 #include "base/environment.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 #include "chrome/browser/about_flags.h"
16 #include "chrome/browser/appcache/chrome_appcache_service.h" 17 #include "chrome/browser/appcache/chrome_appcache_service.h"
17 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 18 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
18 #include "chrome/browser/autofill/personal_data_manager.h" 19 #include "chrome/browser/autofill/personal_data_manager.h"
19 #include "chrome/browser/background_contents_service.h" 20 #include "chrome/browser/background_contents_service.h"
20 #include "chrome/browser/background_mode_manager.h" 21 #include "chrome/browser/background_mode_manager.h"
21 #include "chrome/browser/bookmarks/bookmark_model.h" 22 #include "chrome/browser/bookmarks/bookmark_model.h"
22 #include "chrome/browser/browser_list.h" 23 #include "chrome/browser/browser_list.h"
23 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
24 #include "chrome/browser/browser_signin.h" 25 #include "chrome/browser/browser_signin.h"
25 #include "chrome/browser/browser_thread.h" 26 #include "chrome/browser/browser_thread.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, 271 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this,
271 &ProfileImpl::EnsureSessionServiceCreated); 272 &ProfileImpl::EnsureSessionServiceCreated);
272 273
273 PrefService* prefs = GetPrefs(); 274 PrefService* prefs = GetPrefs();
274 pref_change_registrar_.Init(prefs); 275 pref_change_registrar_.Init(prefs);
275 pref_change_registrar_.Add(prefs::kSpellCheckDictionary, this); 276 pref_change_registrar_.Add(prefs::kSpellCheckDictionary, this);
276 pref_change_registrar_.Add(prefs::kEnableSpellCheck, this); 277 pref_change_registrar_.Add(prefs::kEnableSpellCheck, this);
277 pref_change_registrar_.Add(prefs::kEnableAutoSpellCorrect, this); 278 pref_change_registrar_.Add(prefs::kEnableAutoSpellCorrect, this);
278 pref_change_registrar_.Add(prefs::kClearSiteDataOnExit, this); 279 pref_change_registrar_.Add(prefs::kClearSiteDataOnExit, this);
279 280
281 // Convert active labs into switches. Modifies the current command line.
282 about_flags::ConvertFlagsToSwitches(prefs, CommandLine::ForCurrentProcess());
283
280 // It would be nice to use PathService for fetching this directory, but 284 // It would be nice to use PathService for fetching this directory, but
281 // the cache directory depends on the profile directory, which isn't available 285 // the cache directory depends on the profile directory, which isn't available
282 // to PathService. 286 // to PathService.
283 chrome::GetUserCacheDirectory(path_, &base_cache_path_); 287 chrome::GetUserCacheDirectory(path_, &base_cache_path_);
284 file_util::CreateDirectory(base_cache_path_); 288 file_util::CreateDirectory(base_cache_path_);
285 289
286 // Listen for theme installations from our original profile. 290 // Listen for theme installations from our original profile.
287 registrar_.Add(this, NotificationType::THEME_INSTALLED, 291 registrar_.Add(this, NotificationType::THEME_INSTALLED,
288 Source<Profile>(GetOriginalProfile())); 292 Source<Profile>(GetOriginalProfile()));
289 293
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 } 1389 }
1386 1390
1387 PrerenderManager* ProfileImpl::GetPrerenderManager() { 1391 PrerenderManager* ProfileImpl::GetPrerenderManager() {
1388 CommandLine* cl = CommandLine::ForCurrentProcess(); 1392 CommandLine* cl = CommandLine::ForCurrentProcess();
1389 if (!cl->HasSwitch(switches::kEnablePagePrerender)) 1393 if (!cl->HasSwitch(switches::kEnablePagePrerender))
1390 return NULL; 1394 return NULL;
1391 if (!prerender_manager_) 1395 if (!prerender_manager_)
1392 prerender_manager_ = new PrerenderManager(this); 1396 prerender_manager_ = new PrerenderManager(this);
1393 return prerender_manager_; 1397 return prerender_manager_;
1394 } 1398 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698