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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 10837230: Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove DISALLOW_COPY_AND_ASSIGN, and change RPH::CreateMessageFilters() to not suddenly isolate all… Created 8 years, 4 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/ui/startup/session_crashed_prompt.cc ('k') | content/browser/browser_context.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) 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/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 #include "chrome/common/chrome_switches.h" 71 #include "chrome/common/chrome_switches.h"
72 #include "chrome/common/chrome_version_info.h" 72 #include "chrome/common/chrome_version_info.h"
73 #include "chrome/common/extensions/extension_constants.h" 73 #include "chrome/common/extensions/extension_constants.h"
74 #include "chrome/common/pref_names.h" 74 #include "chrome/common/pref_names.h"
75 #include "chrome/common/url_constants.h" 75 #include "chrome/common/url_constants.h"
76 #include "chrome/installer/util/browser_distribution.h" 76 #include "chrome/installer/util/browser_distribution.h"
77 #include "content/public/browser/child_process_security_policy.h" 77 #include "content/public/browser/child_process_security_policy.h"
78 #include "content/public/browser/dom_storage_context.h" 78 #include "content/public/browser/dom_storage_context.h"
79 #include "content/public/browser/notification_observer.h" 79 #include "content/public/browser/notification_observer.h"
80 #include "content/public/browser/notification_registrar.h" 80 #include "content/public/browser/notification_registrar.h"
81 #include "content/public/browser/storage_partition.h"
81 #include "content/public/browser/web_contents.h" 82 #include "content/public/browser/web_contents.h"
82 #include "content/public/browser/web_contents_view.h" 83 #include "content/public/browser/web_contents_view.h"
83 #include "grit/locale_settings.h" 84 #include "grit/locale_settings.h"
84 #include "ui/base/l10n/l10n_util.h" 85 #include "ui/base/l10n/l10n_util.h"
85 #include "ui/base/resource/resource_bundle.h" 86 #include "ui/base/resource/resource_bundle.h"
86 87
87 #if defined(OS_MACOSX) 88 #if defined(OS_MACOSX)
88 #include "base/mac/mac_util.h" 89 #include "base/mac/mac_util.h"
89 #include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h" 90 #include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h"
90 #endif 91 #endif
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 if (!browser) 641 if (!browser)
641 return false; 642 return false;
642 643
643 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP); 644 AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP);
644 645
645 // Session restore may occur if the startup preference is "last" or if the 646 // Session restore may occur if the startup preference is "last" or if the
646 // crash infobar is displayed. Otherwise, it's safe for the DOM storage system 647 // crash infobar is displayed. Otherwise, it's safe for the DOM storage system
647 // to start deleting leftover data. 648 // to start deleting leftover data.
648 if (pref.type != SessionStartupPref::LAST && 649 if (pref.type != SessionStartupPref::LAST &&
649 !HasPendingUncleanExit(profile_)) { 650 !HasPendingUncleanExit(profile_)) {
650 content::BrowserContext::GetDefaultDOMStorageContext(profile_)-> 651 content::BrowserContext::GetDefaultStoragePartition(profile_)->
651 StartScavengingUnusedSessionStorage(); 652 GetDOMStorageContext()->StartScavengingUnusedSessionStorage();
652 } 653 }
653 654
654 return true; 655 return true;
655 } 656 }
656 657
657 Browser* StartupBrowserCreatorImpl::ProcessSpecifiedURLs( 658 Browser* StartupBrowserCreatorImpl::ProcessSpecifiedURLs(
658 const std::vector<GURL>& urls_to_open) { 659 const std::vector<GURL>& urls_to_open) {
659 SessionStartupPref pref = 660 SessionStartupPref pref =
660 StartupBrowserCreator::GetSessionStartupPref(command_line_, profile_); 661 StartupBrowserCreator::GetSessionStartupPref(command_line_, profile_);
661 StartupTabs tabs; 662 StartupTabs tabs;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 // New: 941 // New:
941 prefs->GetString(prefs::kHomePage), 942 prefs->GetString(prefs::kHomePage),
942 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 943 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
943 prefs->GetBoolean(prefs::kShowHomeButton), 944 prefs->GetBoolean(prefs::kShowHomeButton),
944 // Backup: 945 // Backup:
945 backup_homepage, 946 backup_homepage,
946 backup_homepage_is_ntp, 947 backup_homepage_is_ntp,
947 backup_show_home_button)); 948 backup_show_home_button));
948 } 949 }
949 } 950 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/session_crashed_prompt.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698