summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 03:43:17 +0000
committerrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 03:43:17 +0000
commit8382d8c59cf80194737995129c36caa780960564 (patch)
treeb9c6be55307a8b8565e7bdad079421891bc0def1
parent4d93361635c3350b571819e845aced159709c5c0 (diff)
downloadchromium_src-8382d8c59cf80194737995129c36caa780960564.zip
chromium_src-8382d8c59cf80194737995129c36caa780960564.tar.gz
chromium_src-8382d8c59cf80194737995129c36caa780960564.tar.bz2
profile.cc should only have static and non virtual methods.
BUG=89937 TEST=passes existing Review URL: http://codereview.chromium.org/7885010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101238 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.cc6
-rw-r--r--chrome/browser/profiles/off_the_record_profile_impl.h1
-rw-r--r--chrome/browser/profiles/profile.cc4
-rw-r--r--chrome/browser/profiles/profile.h5
-rw-r--r--chrome/test/base/testing_profile.cc4
-rw-r--r--chrome/test/base/testing_profile.h1
6 files changed, 15 insertions, 6 deletions
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc
index b9c9f05..b4ffcf4 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.cc
+++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -606,6 +606,12 @@ prerender::PrerenderManager* OffTheRecordProfileImpl::GetPrerenderManager() {
return NULL;
}
+chrome_browser_net::Predictor* OffTheRecordProfileImpl::GetNetworkPredictor() {
+ // We do not store information about websites visited in OTR profiles which
+ // is necessary for a Predictor, so we do not have a Predictor at all.
+ return NULL;
+}
+
void OffTheRecordProfileImpl::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.h b/chrome/browser/profiles/off_the_record_profile_impl.h
index f37e6b2..3a79dbd 100644
--- a/chrome/browser/profiles/off_the_record_profile_impl.h
+++ b/chrome/browser/profiles/off_the_record_profile_impl.h
@@ -130,6 +130,7 @@ class OffTheRecordProfileImpl : public Profile,
virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE;
virtual prerender::PrerenderManager* GetPrerenderManager() OVERRIDE;
+ virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
// NotificationObserver implementation.
virtual void Observe(int type,
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 23b24d3..22d1e85 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -225,7 +225,3 @@ bool Profile::IsSyncAccessible() {
ProfileSyncService* syncService = GetProfileSyncService();
return syncService && !syncService->IsManaged();
}
-
-chrome_browser_net::Predictor* Profile::GetNetworkPredictor() {
- return NULL;
-}
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index 70171ac..c08aef9 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -501,6 +501,9 @@ class Profile : public content::BrowserContext {
// profile.
virtual prerender::PrerenderManager* GetPrerenderManager() = 0;
+ // Returns the Predictor object used for dns prefetch.
+ virtual chrome_browser_net::Predictor* GetNetworkPredictor() = 0;
+
std::string GetDebugName();
// Returns whether it is a guest session.
@@ -548,8 +551,6 @@ class Profile : public content::BrowserContext {
// Creates an OffTheRecordProfile which points to this Profile.
Profile* CreateOffTheRecordProfile();
- virtual chrome_browser_net::Predictor* GetNetworkPredictor();
-
protected:
friend class OffTheRecordProfileImpl;
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 5d035a4..9bfa1e7 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -793,6 +793,10 @@ void TestingProfile::SetDownloadManagerDelegate(
NOTIMPLEMENTED();
}
+chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() {
+ return NULL;
+}
+
PrefService* TestingProfile::GetOffTheRecordPrefs() {
return NULL;
}
diff --git a/chrome/test/base/testing_profile.h b/chrome/test/base/testing_profile.h
index 5bae730..63c26d5 100644
--- a/chrome/test/base/testing_profile.h
+++ b/chrome/test/base/testing_profile.h
@@ -280,6 +280,7 @@ class TestingProfile : public Profile {
virtual PromoCounter* GetInstantPromoCounter();
virtual ChromeURLDataManager* GetChromeURLDataManager();
virtual prerender::PrerenderManager* GetPrerenderManager();
+ virtual chrome_browser_net::Predictor* GetNetworkPredictor();
virtual PrefService* GetOffTheRecordPrefs();
// TODO(jam): remove me once webkit_context_unittest.cc doesn't use Profile