summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 19:08:16 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 19:08:16 +0000
commit93f68c23e262b6fe2cc3aba3670a9313bb1f66ca (patch)
tree9277f00473042de7d70df51e30e389024a19563d
parent626762430853281058f6f775b03521a3bc09cef4 (diff)
downloadchromium_src-93f68c23e262b6fe2cc3aba3670a9313bb1f66ca.zip
chromium_src-93f68c23e262b6fe2cc3aba3670a9313bb1f66ca.tar.gz
chromium_src-93f68c23e262b6fe2cc3aba3670a9313bb1f66ca.tar.bz2
Changing all Get*UserProfileOrOffTheRecord() to Get*UserProfile() calls
BUG=322682 TEST=covered by existing unit tests Review URL: https://codereview.chromium.org/108653010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241611 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/automation/automation_util.cc2
-rw-r--r--chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc2
-rw-r--r--chrome/browser/chromeos/enrollment_dialog_view.cc2
-rw-r--r--chrome/browser/chromeos/options/network_config_view.cc2
-rw-r--r--chrome/browser/chromeos/power/peripheral_battery_observer.cc2
-rw-r--r--chrome/browser/chromeos/status/data_promo_notification.cc6
-rw-r--r--chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc4
-rw-r--r--chrome/browser/policy/policy_browsertest.cc2
-rw-r--r--chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc2
-rw-r--r--chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc2
-rw-r--r--chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc2
-rw-r--r--chrome/browser/ui/ash/chrome_new_window_delegate.cc6
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate.cc2
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc8
-rw-r--r--chrome/browser/ui/ash/chrome_shell_delegate_views.cc4
-rw-r--r--chrome/browser/ui/ash/screenshot_taker.cc6
16 files changed, 27 insertions, 27 deletions
diff --git a/chrome/browser/automation/automation_util.cc b/chrome/browser/automation/automation_util.cc
index 745ab88..4fe928c 100644
--- a/chrome/browser/automation/automation_util.cc
+++ b/chrome/browser/automation/automation_util.cc
@@ -193,7 +193,7 @@ Profile* GetCurrentProfileOnChromeOS(std::string* error_message) {
}
return Profile::FromWebUI(web_ui);
} else {
- return ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ return ProfileManager::GetActiveUserProfile();
}
return NULL;
}
diff --git a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
index c8a5920..1da05cf 100644
--- a/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
+++ b/chrome/browser/chromeos/dbus/proxy_resolution_service_provider.cc
@@ -94,7 +94,7 @@ class ProxyResolverImpl : public ProxyResolverInterface {
// GetPrimaryUserProfile() and GetRequestContext() must be called on UI
// thread.
- Profile* profile = ProfileManager::GetPrimaryUserProfileOrOffTheRecord();
+ Profile* profile = ProfileManager::GetPrimaryUserProfile();
scoped_refptr<net::URLRequestContextGetter> getter =
profile->GetRequestContext();
diff --git a/chrome/browser/chromeos/enrollment_dialog_view.cc b/chrome/browser/chromeos/enrollment_dialog_view.cc
index 3d69514..3aaaa8d 100644
--- a/chrome/browser/chromeos/enrollment_dialog_view.cc
+++ b/chrome/browser/chromeos/enrollment_dialog_view.cc
@@ -287,7 +287,7 @@ bool CreateDialog(const std::string& service_path,
Browser* browser = chrome::FindBrowserWithWindow(owning_window);
Profile* profile = browser ? browser->profile() :
- ProfileManager::GetPrimaryUserProfileOrOffTheRecord();
+ ProfileManager::GetPrimaryUserProfile();
DialogEnrollmentDelegate* enrollment =
new DialogEnrollmentDelegate(owning_window, network->name(), profile);
return enrollment->Enroll(certificate_pattern.enrollment_uri_list(),
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc
index f12c2a4..73d6d75 100644
--- a/chrome/browser/chromeos/options/network_config_view.cc
+++ b/chrome/browser/chromeos/options/network_config_view.cc
@@ -46,7 +46,7 @@ gfx::NativeWindow GetParentForUnhostedDialog() {
return chromeos::LoginDisplayHostImpl::default_host()->GetNativeWindow();
} else {
Browser* browser = chrome::FindTabbedBrowser(
- ProfileManager::GetPrimaryUserProfileOrOffTheRecord(),
+ ProfileManager::GetPrimaryUserProfile(),
true,
chrome::HOST_DESKTOP_TYPE_ASH);
if (browser)
diff --git a/chrome/browser/chromeos/power/peripheral_battery_observer.cc b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
index 6934908..6b38fcd 100644
--- a/chrome/browser/chromeos/power/peripheral_battery_observer.cc
+++ b/chrome/browser/chromeos/power/peripheral_battery_observer.cc
@@ -228,7 +228,7 @@ bool PeripheralBatteryObserver::PostNotification(const std::string& address,
notification_manager->Add(
notification,
- ProfileManager::GetPrimaryUserProfileOrOffTheRecord());
+ ProfileManager::GetPrimaryUserProfile());
return true;
}
diff --git a/chrome/browser/chromeos/status/data_promo_notification.cc b/chrome/browser/chromeos/status/data_promo_notification.cc
index 7d7841d..0a49377 100644
--- a/chrome/browser/chromeos/status/data_promo_notification.cc
+++ b/chrome/browser/chromeos/status/data_promo_notification.cc
@@ -43,7 +43,7 @@ namespace {
const int kNotificationCountPrefDefault = -1;
bool GetBooleanPref(const char* pref_name) {
- Profile* profile = ProfileManager::GetPrimaryUserProfileOrOffTheRecord();
+ Profile* profile = ProfileManager::GetPrimaryUserProfile();
PrefService* prefs = profile->GetPrefs();
return prefs->GetBoolean(pref_name);
}
@@ -54,7 +54,7 @@ int GetIntegerLocalPref(const char* pref_name) {
}
void SetBooleanPref(const char* pref_name, bool value) {
- Profile* profile = ProfileManager::GetPrimaryUserProfileOrOffTheRecord();
+ Profile* profile = ProfileManager::GetPrimaryUserProfile();
PrefService* prefs = profile->GetPrefs();
prefs->SetBoolean(pref_name, value);
}
@@ -125,7 +125,7 @@ void NotificationClicked(const std::string& service_path,
ash::network_connect::ShowNetworkSettings(service_path);
chrome::ScopedTabbedBrowserDisplayer displayer(
- ProfileManager::GetPrimaryUserProfileOrOffTheRecord(),
+ ProfileManager::GetPrimaryUserProfile(),
chrome::HOST_DESKTOP_TYPE_ASH);
chrome::ShowSingletonTab(displayer.browser(), GURL(info_url));
}
diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
index 1754878..8a6cfdf 100644
--- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
+++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
@@ -55,7 +55,7 @@ void CloseOpenAshBrowsers() {
void OpenURL(const GURL& url) {
chrome::NavigateParams params(
- ProfileManager::GetActiveUserProfileOrOffTheRecord(),
+ ProfileManager::GetActiveUserProfile(),
GURL(url),
content::PAGE_TRANSITION_TYPED);
params.disposition = NEW_FOREGROUND_TAB;
@@ -140,7 +140,7 @@ void ChromeMetroViewerProcessHost::OnOpenURL(const base::string16& url) {
void ChromeMetroViewerProcessHost::OnHandleSearchRequest(
const base::string16& search_string) {
GURL url(GetDefaultSearchURLForSearchTerms(
- ProfileManager::GetActiveUserProfileOrOffTheRecord(), search_string));
+ ProfileManager::GetActiveUserProfile(), search_string));
if (url.is_valid())
OpenURL(url);
}
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 54d6498..a75bc84 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -338,7 +338,7 @@ void DownloadAndVerifyFile(
int CountScreenshots() {
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
- ProfileManager::GetActiveUserProfileOrOffTheRecord());
+ ProfileManager::GetActiveUserProfile());
base::FileEnumerator enumerator(download_prefs->DownloadPath(),
false, base::FileEnumerator::FILES,
"Screenshot*");
diff --git a/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc b/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc
index 09b94fa..5b2b156 100644
--- a/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc
+++ b/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc
@@ -174,7 +174,7 @@ class PeopleProviderTest : public InProcessBrowserTest {
base::Unretained(this)));
people_provider_.reset(new PeopleProvider(
- ProfileManager::GetActiveUserProfileOrOffTheRecord()));
+ ProfileManager::GetActiveUserProfile()));
people_provider_->SetupForTest(
base::Bind(&PeopleProviderTest::OnSearchResultsFetched,
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc b/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc
index ddbcc0b..981251c 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc
@@ -85,7 +85,7 @@ class WebstoreProviderTest : public InProcessBrowserTest {
switches::kAppsGalleryURL, test_server_->base_url().spec());
webstore_provider_.reset(new WebstoreProvider(
- ProfileManager::GetActiveUserProfileOrOffTheRecord(), NULL));
+ ProfileManager::GetActiveUserProfile(), NULL));
webstore_provider_->set_webstore_search_fetched_callback(
base::Bind(&WebstoreProviderTest::OnSearchResultsFetched,
base::Unretained(this)));
diff --git a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
index 343a88e..b7c989a 100644
--- a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
+++ b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc
@@ -86,7 +86,7 @@ void AshKeyboardControllerProxy::OnRequest(
}
content::BrowserContext* AshKeyboardControllerProxy::GetBrowserContext() {
- return ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ return ProfileManager::GetActiveUserProfile();
}
ui::InputMethod* AshKeyboardControllerProxy::GetInputMethod() {
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate.cc b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
index fdf9372..e0d4a53 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
@@ -85,13 +85,13 @@ void ChromeNewWindowDelegate::NewTab() {
}
chrome::ScopedTabbedBrowserDisplayer displayer(
- ProfileManager::GetActiveUserProfileOrOffTheRecord(),
+ ProfileManager::GetActiveUserProfile(),
chrome::HOST_DESKTOP_TYPE_ASH);
chrome::NewTab(displayer.browser());
}
void ChromeNewWindowDelegate::NewWindow(bool is_incognito) {
- Profile* profile = ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ Profile* profile = ProfileManager::GetActiveUserProfile();
chrome::NewEmptyWindow(
is_incognito ? profile->GetOffTheRecordProfile() : profile,
chrome::HOST_DESKTOP_TYPE_ASH);
@@ -106,7 +106,7 @@ void ChromeNewWindowDelegate::RestoreTab() {
Browser* browser = GetBrowserForActiveWindow();
Profile* profile = browser ? browser->profile() : NULL;
if (!profile)
- profile = ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ profile = ProfileManager::GetActiveUserProfile();
if (profile->IsOffTheRecord())
return;
TabRestoreService* service =
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 4ef64504..f858e0d 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -97,7 +97,7 @@ content::BrowserContext* ChromeShellDelegate::GetActiveBrowserContext() {
#if defined(OS_CHROMEOS)
DCHECK(chromeos::UserManager::Get()->GetLoggedInUsers().size());
#endif
- return ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ return ProfileManager::GetActiveUserProfile();
}
app_list::AppListViewDelegate*
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index ebf9bb2..f09cc95 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -143,7 +143,7 @@ class AccessibilityDelegateImpl : public ash::AccessibilityDelegate {
virtual void TriggerAccessibilityAlert(
ash::AccessibilityAlert alert) OVERRIDE {
- Profile* profile = ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ Profile* profile = ProfileManager::GetActiveUserProfile();
if (profile) {
switch (alert) {
case ash::A11Y_ALERT_WINDOW_NEEDED: {
@@ -178,19 +178,19 @@ class MediaDelegateImpl : public ash::MediaDelegate {
virtual void HandleMediaNextTrack() OVERRIDE {
extensions::MediaPlayerAPI::Get(
- ProfileManager::GetActiveUserProfileOrOffTheRecord())->
+ ProfileManager::GetActiveUserProfile())->
media_player_event_router()->NotifyNextTrack();
}
virtual void HandleMediaPlayPause() OVERRIDE {
extensions::MediaPlayerAPI::Get(
- ProfileManager::GetActiveUserProfileOrOffTheRecord())->
+ ProfileManager::GetActiveUserProfile())->
media_player_event_router()->NotifyTogglePlayState();
}
virtual void HandleMediaPrevTrack() OVERRIDE {
extensions::MediaPlayerAPI::Get(
- ProfileManager::GetActiveUserProfileOrOffTheRecord())->
+ ProfileManager::GetActiveUserProfile())->
media_player_event_router()->NotifyPrevTrack();
}
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_views.cc b/chrome/browser/ui/ash/chrome_shell_delegate_views.cc
index 2a615e0..db4feb3 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_views.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_views.cc
@@ -215,7 +215,7 @@ void ChromeShellDelegate::Observe(int type,
dummy,
chrome::startup::IS_NOT_FIRST_RUN);
startup_impl.Launch(
- ProfileManager::GetActiveUserProfileOrOffTheRecord(),
+ ProfileManager::GetActiveUserProfile(),
std::vector<GURL>(),
true,
chrome::HOST_DESKTOP_TYPE_ASH);
@@ -228,7 +228,7 @@ void ChromeShellDelegate::Observe(int type,
}
chrome::ScopedTabbedBrowserDisplayer displayer(
- ProfileManager::GetActiveUserProfileOrOffTheRecord(),
+ ProfileManager::GetActiveUserProfile(),
chrome::HOST_DESKTOP_TYPE_ASH);
chrome::AddTabAt(displayer.browser(), GURL(), -1, true);
}
diff --git a/chrome/browser/ui/ash/screenshot_taker.cc b/chrome/browser/ui/ash/screenshot_taker.cc
index 02cb64d..d2f46c3 100644
--- a/chrome/browser/ui/ash/screenshot_taker.cc
+++ b/chrome/browser/ui/ash/screenshot_taker.cc
@@ -312,7 +312,7 @@ bool GrabWindowSnapshot(aura::Window* window,
bool ShouldUse24HourClock() {
#if defined(OS_CHROMEOS)
- Profile* profile = ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ Profile* profile = ProfileManager::GetActiveUserProfile();
if (profile) {
return profile->GetPrefs()->GetBoolean(prefs::kUse24HourClock);
}
@@ -358,7 +358,7 @@ bool GetScreenshotDirectory(base::FilePath* directory) {
if (is_logged_in) {
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(
- ProfileManager::GetActiveUserProfileOrOffTheRecord());
+ ProfileManager::GetActiveUserProfile());
*directory = download_prefs->DownloadPath();
} else {
if (!base::GetTempDir(directory)) {
@@ -581,7 +581,7 @@ bool ScreenshotTaker::HasObserver(ScreenshotTakerObserver* observer) const {
Profile* ScreenshotTaker::GetProfile() {
if (profile_for_test_)
return profile_for_test_;
- return ProfileManager::GetActiveUserProfileOrOffTheRecord();
+ return ProfileManager::GetActiveUserProfile();
}
void ScreenshotTaker::SetScreenshotDirectoryForTest(