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

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

Issue 8907025: Merge 114213 - Fixes for the kWasRestarted pref. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: Created 9 years 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/chrome_browser_main_posix.cc ('k') | chrome/browser/ui/browser.cc » ('j') | 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "chrome/browser/search_engines/template_url_fetcher.h" 70 #include "chrome/browser/search_engines/template_url_fetcher.h"
71 #include "chrome/browser/search_engines/template_url_service.h" 71 #include "chrome/browser/search_engines/template_url_service.h"
72 #include "chrome/browser/sessions/session_service_factory.h" 72 #include "chrome/browser/sessions/session_service_factory.h"
73 #include "chrome/browser/speech/chrome_speech_input_manager.h" 73 #include "chrome/browser/speech/chrome_speech_input_manager.h"
74 #include "chrome/browser/speech/chrome_speech_input_preferences.h" 74 #include "chrome/browser/speech/chrome_speech_input_preferences.h"
75 #include "chrome/browser/spellchecker/spellcheck_profile.h" 75 #include "chrome/browser/spellchecker/spellcheck_profile.h"
76 #include "chrome/browser/sync/profile_sync_components_factory_impl.h" 76 #include "chrome/browser/sync/profile_sync_components_factory_impl.h"
77 #include "chrome/browser/sync/profile_sync_service.h" 77 #include "chrome/browser/sync/profile_sync_service.h"
78 #include "chrome/browser/tabs/pinned_tab_service_factory.h" 78 #include "chrome/browser/tabs/pinned_tab_service_factory.h"
79 #include "chrome/browser/transport_security_persister.h" 79 #include "chrome/browser/transport_security_persister.h"
80 #include "chrome/browser/ui/browser_init.h"
80 #include "chrome/browser/ui/browser_list.h" 81 #include "chrome/browser/ui/browser_list.h"
81 #include "chrome/browser/ui/find_bar/find_bar_state.h" 82 #include "chrome/browser/ui/find_bar/find_bar_state.h"
82 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 83 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
83 #include "chrome/browser/ui/webui/extension_icon_source.h" 84 #include "chrome/browser/ui/webui/extension_icon_source.h"
84 #include "chrome/browser/user_style_sheet_watcher.h" 85 #include "chrome/browser/user_style_sheet_watcher.h"
85 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" 86 #include "chrome/browser/visitedlink/visitedlink_event_listener.h"
86 #include "chrome/browser/visitedlink/visitedlink_master.h" 87 #include "chrome/browser/visitedlink/visitedlink_master.h"
87 #include "chrome/browser/web_resource/promo_resource_service.h" 88 #include "chrome/browser/web_resource/promo_resource_service.h"
88 #include "chrome/browser/webdata/web_data_service.h" 89 #include "chrome/browser/webdata/web_data_service.h"
89 #include "chrome/common/chrome_constants.h" 90 #include "chrome/common/chrome_constants.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 extensions_cookie_path = 368 extensions_cookie_path =
368 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); 369 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename);
369 370
370 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); 371 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname);
371 372
372 bool restore_old_session_cookies = 373 bool restore_old_session_cookies =
373 session_restore_enabled_ && 374 session_restore_enabled_ &&
374 (!DidLastSessionExitCleanly() || 375 (!DidLastSessionExitCleanly() ||
375 CommandLine::ForCurrentProcess()->HasSwitch( 376 CommandLine::ForCurrentProcess()->HasSwitch(
376 switches::kRestoreLastSession) || 377 switches::kRestoreLastSession) ||
377 local_state->GetBoolean(prefs::kWasRestarted)); 378 BrowserInit::WasRestarted());
378 379
379 // Make sure we initialize the ProfileIOData after everything else has been 380 // Make sure we initialize the ProfileIOData after everything else has been
380 // initialized that we might be reading from the IO thread. 381 // initialized that we might be reading from the IO thread.
381 382
382 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path, 383 io_data_.Init(cookie_path, origin_bound_cert_path, cache_path,
383 cache_max_size, media_cache_path, media_cache_max_size, 384 cache_max_size, media_cache_path, media_cache_max_size,
384 extensions_cookie_path, app_path, predictor_, 385 extensions_cookie_path, app_path, predictor_,
385 g_browser_process->local_state(), 386 g_browser_process->local_state(),
386 g_browser_process->io_thread(), 387 g_browser_process->io_thread(),
387 restore_old_session_cookies); 388 restore_old_session_cookies);
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 FilePath* cache_path, 1620 FilePath* cache_path,
1620 int* max_size) { 1621 int* max_size) {
1621 DCHECK(cache_path); 1622 DCHECK(cache_path);
1622 DCHECK(max_size); 1623 DCHECK(max_size);
1623 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); 1624 FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir));
1624 if (!path.empty()) 1625 if (!path.empty())
1625 *cache_path = path; 1626 *cache_path = path;
1626 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1627 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1627 prefs_->GetInteger(prefs::kDiskCacheSize); 1628 prefs_->GetInteger(prefs::kDiskCacheSize);
1628 } 1629 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_posix.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698