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

Unified Diff: chrome/browser/profiles/profile.h

Issue 7438002: Deprecate Profile::GetDefaultRequestContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix other references. Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile.h
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index 8d335b17b98f81f4b078d497682cf53b485ca1d1..f02e925c59d1014f3eed93bb589cd7da7640f41a 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -12,12 +12,22 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "chrome/browser/net/preconnect.h" // TODO: remove this.
#include "chrome/common/extensions/extension.h"
namespace base {
class Time;
}
+namespace chrome_browser_net_websocket_experiment {
+class WebSocketExperimentTask;
+}
+
+namespace chromeos {
+class LibCrosServiceLibraryImpl;
+class ResetDefaultProxyConfigServiceTask;
+}
+
namespace content {
class ResourceContext;
}
@@ -45,6 +55,10 @@ namespace quota {
class QuotaManager;
}
+namespace speech_input {
+class SpeechRecognizer;
+}
+
namespace webkit_database {
class DatabaseTracker;
}
@@ -143,8 +157,40 @@ class Profile {
virtual void OnProfileCreated(Profile* profile, bool success) = 0;
};
+ // Whitelist access to deprecated API in order to prevent new regressions.
+ class Deprecated {
+ private:
+ friend bool IsGoogleGAIACookieInstalled();
+ friend void chrome_browser_net::PreconnectOnIOThread(
+ const GURL&,
+ chrome_browser_net::UrlInfo::ResolutionMotivation,
+ int);
+
+ friend class AutofillDownloadManager;
+ friend class ChromePluginMessageFilter;
+ friend class DefaultGeolocationArbitratorDependencyFactory;
+ friend class DevToolsHttpProtocolHandler;
+ friend class DevToolsUI;
+ friend class LiveSyncTest;
+ friend class MetricsService;
+ friend class ResolveProxyMsgHelper;
+ friend class SafeBrowsingServiceTestHelper;
+ friend class SdchDictionaryFetcher;
+ friend class Toolbar5Importer;
+ friend class TranslateManager;
+ friend class
+ chrome_browser_net_websocket_experiment::WebSocketExperimentTask;
+ friend class chromeos::LibCrosServiceLibraryImpl;
+ friend class chromeos::ResetDefaultProxyConfigServiceTask;
+ friend class speech_input::SpeechRecognizer;
+
+ static net::URLRequestContextGetter* GetDefaultRequestContext() {
+ return Profile::GetDefaultRequestContext();
+ }
+ };
+
// Key used to bind profile to the widget with which it is associated.
- static const char* kProfileKey;
+ static const char* const kProfileKey;
#if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
// Value that represents no local profile id.
@@ -165,12 +211,6 @@ class Profile {
static Profile* CreateProfileAsync(const FilePath& path,
Delegate* delegate);
- // Returns the request context for the "default" profile. This may be called
- // from any thread. This CAN return NULL if a first request context has not
- // yet been created. If necessary, listen on the UI thread for
- // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE.
- static net::URLRequestContextGetter* GetDefaultRequestContext();
-
// Returns the name associated with this profile. This name is displayed in
// the browser frame.
virtual std::string GetProfileName() = 0;
@@ -568,6 +608,15 @@ class Profile {
static net::URLRequestContextGetter* default_request_context_;
private:
+ // ***DEPRECATED**: You should be passing in the specific profile's
+ // URLRequestContextGetter or using the system URLRequestContextGetter.
+ //
+ // Returns the request context for the "default" profile. This may be called
+ // from any thread. This CAN return NULL if a first request context has not
+ // yet been created. If necessary, listen on the UI thread for
+ // NOTIFY_DEFAULT_REQUEST_CONTEXT_AVAILABLE.
+ static net::URLRequestContextGetter* GetDefaultRequestContext();
+
bool restored_last_session_;
// Accessibility events will only be propagated when the pause

Powered by Google App Engine
This is Rietveld 408576698