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

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

Issue 1171333003: Move net::FormatUrl and friends outside of //net and into //components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again now that CQ is fixed Created 5 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
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_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #include "components/content_settings/core/browser/host_content_settings_map.h" 83 #include "components/content_settings/core/browser/host_content_settings_map.h"
84 #include "components/domain_reliability/monitor.h" 84 #include "components/domain_reliability/monitor.h"
85 #include "components/domain_reliability/service.h" 85 #include "components/domain_reliability/service.h"
86 #include "components/keyed_service/content/browser_context_dependency_manager.h" 86 #include "components/keyed_service/content/browser_context_dependency_manager.h"
87 #include "components/metrics/metrics_service.h" 87 #include "components/metrics/metrics_service.h"
88 #include "components/omnibox/browser/autocomplete_classifier.h" 88 #include "components/omnibox/browser/autocomplete_classifier.h"
89 #include "components/omnibox/browser/shortcuts_backend.h" 89 #include "components/omnibox/browser/shortcuts_backend.h"
90 #include "components/pref_registry/pref_registry_syncable.h" 90 #include "components/pref_registry/pref_registry_syncable.h"
91 #include "components/signin/core/browser/signin_manager.h" 91 #include "components/signin/core/browser/signin_manager.h"
92 #include "components/ui/zoom/zoom_event_manager.h" 92 #include "components/ui/zoom/zoom_event_manager.h"
93 #include "components/url_fixer/url_fixer.h" 93 #include "components/url_formatter/url_fixer.h"
94 #include "components/user_prefs/user_prefs.h" 94 #include "components/user_prefs/user_prefs.h"
95 #include "content/public/browser/browser_thread.h" 95 #include "content/public/browser/browser_thread.h"
96 #include "content/public/browser/dom_storage_context.h" 96 #include "content/public/browser/dom_storage_context.h"
97 #include "content/public/browser/notification_service.h" 97 #include "content/public/browser/notification_service.h"
98 #include "content/public/browser/render_process_host.h" 98 #include "content/public/browser/render_process_host.h"
99 #include "content/public/browser/storage_partition.h" 99 #include "content/public/browser/storage_partition.h"
100 #include "content/public/browser/url_data_source.h" 100 #include "content/public/browser/url_data_source.h"
101 #include "content/public/browser/user_metrics.h" 101 #include "content/public/browser/user_metrics.h"
102 #include "content/public/common/content_constants.h" 102 #include "content/public/common/content_constants.h"
103 #include "content/public/common/page_zoom.h" 103 #include "content/public/common/page_zoom.h"
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 const base::CommandLine& command_line = 1200 const base::CommandLine& command_line =
1201 *base::CommandLine::ForCurrentProcess(); 1201 *base::CommandLine::ForCurrentProcess();
1202 if (command_line.HasSwitch(switches::kHomePage)) { 1202 if (command_line.HasSwitch(switches::kHomePage)) {
1203 // TODO(evanm): clean up usage of DIR_CURRENT. 1203 // TODO(evanm): clean up usage of DIR_CURRENT.
1204 // http://code.google.com/p/chromium/issues/detail?id=60630 1204 // http://code.google.com/p/chromium/issues/detail?id=60630
1205 // For now, allow this code to call getcwd(). 1205 // For now, allow this code to call getcwd().
1206 base::ThreadRestrictions::ScopedAllowIO allow_io; 1206 base::ThreadRestrictions::ScopedAllowIO allow_io;
1207 1207
1208 base::FilePath browser_directory; 1208 base::FilePath browser_directory;
1209 PathService::Get(base::DIR_CURRENT, &browser_directory); 1209 PathService::Get(base::DIR_CURRENT, &browser_directory);
1210 GURL home_page(url_fixer::FixupRelativeFile( 1210 GURL home_page(url_formatter::FixupRelativeFile(
1211 browser_directory, 1211 browser_directory,
1212 command_line.GetSwitchValuePath(switches::kHomePage))); 1212 command_line.GetSwitchValuePath(switches::kHomePage)));
1213 if (home_page.is_valid()) 1213 if (home_page.is_valid())
1214 return home_page; 1214 return home_page;
1215 } 1215 }
1216 1216
1217 if (GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage)) 1217 if (GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage))
1218 return GURL(chrome::kChromeUINewTabURL); 1218 return GURL(chrome::kChromeUINewTabURL);
1219 GURL home_page(url_fixer::FixupURL(GetPrefs()->GetString(prefs::kHomePage), 1219 GURL home_page(url_formatter::FixupURL(
1220 std::string())); 1220 GetPrefs()->GetString(prefs::kHomePage), std::string()));
1221 if (!home_page.is_valid()) 1221 if (!home_page.is_valid())
1222 return GURL(chrome::kChromeUINewTabURL); 1222 return GURL(chrome::kChromeUINewTabURL);
1223 return home_page; 1223 return home_page;
1224 } 1224 }
1225 1225
1226 void ProfileImpl::UpdateProfileSupervisedUserIdCache() { 1226 void ProfileImpl::UpdateProfileSupervisedUserIdCache() {
1227 ProfileManager* profile_manager = g_browser_process->profile_manager(); 1227 ProfileManager* profile_manager = g_browser_process->profile_manager();
1228 ProfileInfoCache& cache = profile_manager->GetProfileInfoCache(); 1228 ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
1229 size_t index = cache.GetIndexOfProfileWithPath(GetPath()); 1229 size_t index = cache.GetIndexOfProfileWithPath(GetPath());
1230 if (index != std::string::npos) { 1230 if (index != std::string::npos) {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1308 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1309 domain_reliability::DomainReliabilityService* service = 1309 domain_reliability::DomainReliabilityService* service =
1310 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1310 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1311 GetForBrowserContext(this); 1311 GetForBrowserContext(this);
1312 if (!service) 1312 if (!service)
1313 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); 1313 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>();
1314 1314
1315 return service->CreateMonitor( 1315 return service->CreateMonitor(
1316 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 1316 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
1317 } 1317 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698