OLD | NEW |
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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 if (GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && | 1075 if (GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && |
1076 sat != EXPLICIT_ACCESS) | 1076 sat != EXPLICIT_ACCESS) |
1077 return NULL; | 1077 return NULL; |
1078 | 1078 |
1079 if (!history_service_created_) { | 1079 if (!history_service_created_) { |
1080 history_service_created_ = true; | 1080 history_service_created_ = true; |
1081 scoped_refptr<HistoryService> history(new HistoryService(this)); | 1081 scoped_refptr<HistoryService> history(new HistoryService(this)); |
1082 if (!history->Init(GetPath(), GetBookmarkModel())) | 1082 if (!history->Init(GetPath(), GetBookmarkModel())) |
1083 return NULL; | 1083 return NULL; |
1084 history_service_.swap(history); | 1084 history_service_.swap(history); |
1085 | |
1086 // Send out the notification that the history service was created. | |
1087 NotificationService::current()-> | |
1088 Notify(chrome::NOTIFICATION_HISTORY_CREATED, Source<Profile>(this), | |
1089 Details<HistoryService>(history_service_.get())); | |
1090 } | 1085 } |
1091 return history_service_.get(); | 1086 return history_service_.get(); |
1092 } | 1087 } |
1093 | 1088 |
1094 HistoryService* ProfileImpl::GetHistoryServiceWithoutCreating() { | 1089 HistoryService* ProfileImpl::GetHistoryServiceWithoutCreating() { |
1095 return history_service_.get(); | 1090 return history_service_.get(); |
1096 } | 1091 } |
1097 | 1092 |
1098 TemplateURLFetcher* ProfileImpl::GetTemplateURLFetcher() { | 1093 TemplateURLFetcher* ProfileImpl::GetTemplateURLFetcher() { |
1099 if (!template_url_fetcher_.get()) | 1094 if (!template_url_fetcher_.get()) |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 new prerender::PrerenderManager( | 1739 new prerender::PrerenderManager( |
1745 this, g_browser_process->prerender_tracker())); | 1740 this, g_browser_process->prerender_tracker())); |
1746 #if defined(OS_CHROMEOS) | 1741 #if defined(OS_CHROMEOS) |
1747 prerender_manager_->AddCondition( | 1742 prerender_manager_->AddCondition( |
1748 new chromeos::PrerenderConditionNetwork( | 1743 new chromeos::PrerenderConditionNetwork( |
1749 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); | 1744 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); |
1750 #endif | 1745 #endif |
1751 } | 1746 } |
1752 return prerender_manager_.get(); | 1747 return prerender_manager_.get(); |
1753 } | 1748 } |
OLD | NEW |