summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc1
-rw-r--r--chrome/browser/chromeos/extensions/screenlock_private_api.cc11
-rw-r--r--chrome/browser/chromeos/extensions/screenlock_private_api.h8
-rw-r--r--chrome/browser/extensions/api/api_resource_manager.h4
-rw-r--r--chrome/browser/extensions/api/audio/audio_api.cc1
-rw-r--r--chrome/browser/extensions/api/cast_channel/cast_channel_api.cc1
-rw-r--r--chrome/browser/extensions/api/commands/commands.cc1
-rw-r--r--chrome/browser/extensions/api/cookies/cookies_api.cc14
-rw-r--r--chrome/browser/extensions/api/cookies/cookies_api.h4
-rw-r--r--chrome/browser/extensions/api/feedback_private/feedback_private_api.cc1
-rw-r--r--chrome/browser/extensions/api/hid/hid_api.cc1
-rw-r--r--chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc1
-rw-r--r--chrome/browser/extensions/api/image_writer_private/test_utils.cc4
-rw-r--r--chrome/browser/extensions/api/image_writer_private/test_utils.h2
-rw-r--r--chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h1
-rw-r--r--chrome/browser/extensions/api/location/location_api.cc1
-rw-r--r--chrome/browser/extensions/api/messaging/incognito_connectability.cc1
-rw-r--r--chrome/browser/extensions/api/processes/processes_api.cc1
-rw-r--r--chrome/browser/extensions/api/profile_keyed_api_factory.h21
-rw-r--r--chrome/browser/extensions/api/serial/serial_api.cc1
-rw-r--r--chrome/browser/extensions/api/serial/serial_event_dispatcher.h2
-rw-r--r--chrome/browser/extensions/api/socket/socket_api.cc1
-rw-r--r--chrome/browser/extensions/api/sockets_tcp/sockets_tcp_api.cc1
-rw-r--r--chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api.cc1
-rw-r--r--chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc1
-rw-r--r--chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc2
-rw-r--r--chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h4
-rw-r--r--chrome/browser/extensions/dev_mode_bubble_controller.cc1
-rw-r--r--chrome/browser/extensions/extension_message_bubble_controller.cc1
-rw-r--r--chrome/browser/extensions/extension_message_bubble_controller.h1
-rw-r--r--chrome/browser/extensions/extension_web_contents_observer.cc1
-rw-r--r--chrome/browser/extensions/signin/scoped_gaia_auth_extension.cc10
-rw-r--r--chrome/browser/extensions/signin/scoped_gaia_auth_extension.h8
-rw-r--r--chrome/browser/speech/extension_api/tts_extension_api.cc1
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm1
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc1
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc1
37 files changed, 78 insertions, 40 deletions
diff --git a/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc b/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc
index 78b0d28..53465d5 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc
@@ -10,6 +10,7 @@
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h"
+#include "chrome/browser/profiles/profile.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h"
#include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/chromeos/extensions/screenlock_private_api.cc b/chrome/browser/chromeos/extensions/screenlock_private_api.cc
index a81e1d1..f013fdc 100644
--- a/chrome/browser/chromeos/extensions/screenlock_private_api.cc
+++ b/chrome/browser/chromeos/extensions/screenlock_private_api.cc
@@ -12,6 +12,7 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
+#include "ui/gfx/image/image.h"
namespace screenlock = extensions::api::screenlock_private;
@@ -244,8 +245,9 @@ bool ScreenlockPrivateAcceptAuthAttemptFunction::RunImpl() {
return true;
}
-ScreenlockPrivateEventRouter::ScreenlockPrivateEventRouter(Profile* profile)
- : profile_(profile) {
+ScreenlockPrivateEventRouter::ScreenlockPrivateEventRouter(
+ content::BrowserContext* context)
+ : browser_context_(context) {
chromeos::SessionManagerClient* session_manager =
chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
if (!session_manager->HasObserver(this))
@@ -272,8 +274,9 @@ void ScreenlockPrivateEventRouter::DispatchEvent(
args->Append(arg);
scoped_ptr<extensions::Event> event(new extensions::Event(
event_name, args.Pass()));
- extensions::ExtensionSystem::Get(profile_)->event_router()->
- BroadcastEvent(event.Pass());
+ extensions::ExtensionSystem::Get(browser_context_)
+ ->event_router()
+ ->BroadcastEvent(event.Pass());
}
static base::LazyInstance<extensions::ProfileKeyedAPIFactory<
diff --git a/chrome/browser/chromeos/extensions/screenlock_private_api.h b/chrome/browser/chromeos/extensions/screenlock_private_api.h
index 3aa43ef..10996da 100644
--- a/chrome/browser/chromeos/extensions/screenlock_private_api.h
+++ b/chrome/browser/chromeos/extensions/screenlock_private_api.h
@@ -10,6 +10,10 @@
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chromeos/dbus/session_manager_client.h"
+namespace gfx {
+class Image;
+}
+
namespace extensions {
class ScreenlockPrivateGetLockedFunction : public ChromeAsyncExtensionFunction {
@@ -116,7 +120,7 @@ class ScreenlockPrivateEventRouter
: public extensions::ProfileKeyedAPI,
public chromeos::SessionManagerClient::Observer {
public:
- explicit ScreenlockPrivateEventRouter(Profile* profile);
+ explicit ScreenlockPrivateEventRouter(content::BrowserContext* context);
virtual ~ScreenlockPrivateEventRouter();
void OnButtonClicked();
@@ -145,7 +149,7 @@ class ScreenlockPrivateEventRouter
void DispatchEvent(const std::string& event_name, base::Value* arg);
- Profile* profile_;
+ content::BrowserContext* browser_context_;
DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateEventRouter);
};
diff --git a/chrome/browser/extensions/api/api_resource_manager.h b/chrome/browser/extensions/api/api_resource_manager.h
index 6d3008a..31c2f1f 100644
--- a/chrome/browser/extensions/api/api_resource_manager.h
+++ b/chrome/browser/extensions/api/api_resource_manager.h
@@ -88,9 +88,9 @@ class ApiResourceManager : public ProfileKeyedAPI,
// For Testing.
static ApiResourceManager<T>* CreateApiResourceManagerForTest(
- Profile* profile,
+ content::BrowserContext* context,
content::BrowserThread::ID thread_id) {
- ApiResourceManager* manager = new ApiResourceManager<T>(profile);
+ ApiResourceManager* manager = new ApiResourceManager<T>(context);
manager->thread_id_ = thread_id;
manager->data_ = new ApiResourceData(thread_id);
return manager;
diff --git a/chrome/browser/extensions/api/audio/audio_api.cc b/chrome/browser/extensions/api/audio/audio_api.cc
index fecb996..ba4c058 100644
--- a/chrome/browser/extensions/api/audio/audio_api.cc
+++ b/chrome/browser/extensions/api/audio/audio_api.cc
@@ -6,6 +6,7 @@
#include "base/lazy_instance.h"
#include "base/values.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/audio.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
diff --git a/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc b/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc
index e6dc135..cb707ac 100644
--- a/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc
+++ b/chrome/browser/extensions/api/cast_channel/cast_channel_api.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/api/cast_channel/cast_socket.h"
#include "chrome/browser/net/chrome_net_log.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
diff --git a/chrome/browser/extensions/api/commands/commands.cc b/chrome/browser/extensions/api/commands/commands.cc
index e2f076db..621ad55 100644
--- a/chrome/browser/extensions/api/commands/commands.cc
+++ b/chrome/browser/extensions/api/commands/commands.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/api/commands/commands.h"
#include "chrome/browser/extensions/api/commands/command_service.h"
+#include "chrome/browser/profiles/profile.h"
namespace {
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.cc b/chrome/browser/extensions/api/cookies/cookies_api.cc
index 6df1a70..4eb83b4 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.cc
+++ b/chrome/browser/extensions/api/cookies/cookies_api.cc
@@ -560,9 +560,9 @@ void CookiesGetAllCookieStoresFunction::Run() {
SendResponse(RunImpl());
}
-CookiesAPI::CookiesAPI(Profile* profile)
- : profile_(profile) {
- ExtensionSystem::Get(profile_)->event_router()->RegisterObserver(
+CookiesAPI::CookiesAPI(content::BrowserContext* context)
+ : browser_context_(context) {
+ ExtensionSystem::Get(browser_context_)->event_router()->RegisterObserver(
this, cookies::OnChanged::kEventName);
}
@@ -570,7 +570,8 @@ CookiesAPI::~CookiesAPI() {
}
void CookiesAPI::Shutdown() {
- ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
+ ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver(
+ this);
}
static base::LazyInstance<ProfileKeyedAPIFactory<CookiesAPI> >
@@ -583,8 +584,9 @@ ProfileKeyedAPIFactory<CookiesAPI>* CookiesAPI::GetFactoryInstance() {
void CookiesAPI::OnListenerAdded(
const extensions::EventListenerInfo& details) {
- cookies_event_router_.reset(new CookiesEventRouter(profile_));
- ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
+ cookies_event_router_.reset(new CookiesEventRouter(browser_context_));
+ ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver(
+ this);
}
} // namespace extensions
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.h b/chrome/browser/extensions/api/cookies/cookies_api.h
index 0020b8c..433ca34 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.h
+++ b/chrome/browser/extensions/api/cookies/cookies_api.h
@@ -196,7 +196,7 @@ class CookiesGetAllCookieStoresFunction : public CookiesFunction {
class CookiesAPI : public ProfileKeyedAPI,
public extensions::EventRouter::Observer {
public:
- explicit CookiesAPI(Profile* profile);
+ explicit CookiesAPI(content::BrowserContext* context);
virtual ~CookiesAPI();
// BrowserContextKeyedService implementation.
@@ -212,7 +212,7 @@ class CookiesAPI : public ProfileKeyedAPI,
private:
friend class ProfileKeyedAPIFactory<CookiesAPI>;
- Profile* profile_;
+ content::BrowserContext* browser_context_;
// ProfileKeyedAPI implementation.
static const char* service_name() {
diff --git a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc
index f5ddf41..36e57d1 100644
--- a/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc
+++ b/chrome/browser/extensions/api/feedback_private/feedback_private_api.cc
@@ -12,6 +12,7 @@
#include "base/values.h"
#include "chrome/browser/extensions/api/feedback_private/feedback_service.h"
#include "chrome/browser/feedback/tracing_manager.h"
+#include "chrome/browser/profiles/profile.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/extensions/api/hid/hid_api.cc b/chrome/browser/extensions/api/hid/hid_api.cc
index e5e8eb3..62a5d73 100644
--- a/chrome/browser/extensions/api/hid/hid_api.cc
+++ b/chrome/browser/extensions/api/hid/hid_api.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/extensions/api/api_resource_manager.h"
#include "chrome/browser/extensions/api/hid/hid_device_resource.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/hid.h"
#include "chrome/common/extensions/permissions/usb_device_permission.h"
#include "device/hid/hid_connection.h"
diff --git a/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc b/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc
index cb08e56..e89d460 100644
--- a/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc
+++ b/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/extensions/api/image_writer_private/error_messages.h"
#include "chrome/browser/extensions/api/image_writer_private/image_writer_private_api.h"
#include "chrome/browser/extensions/api/image_writer_private/operation_manager.h"
+#include "chrome/browser/profiles/profile.h"
namespace image_writer_api = extensions::api::image_writer_private;
diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.cc b/chrome/browser/extensions/api/image_writer_private/test_utils.cc
index 29c5b5c..0ea01bc 100644
--- a/chrome/browser/extensions/api/image_writer_private/test_utils.cc
+++ b/chrome/browser/extensions/api/image_writer_private/test_utils.cc
@@ -51,8 +51,8 @@ class ImageWriterFakeImageBurnerClient
#endif
MockOperationManager::MockOperationManager() : OperationManager(NULL) {}
-MockOperationManager::MockOperationManager(Profile* profile)
- : OperationManager(profile) {}
+MockOperationManager::MockOperationManager(content::BrowserContext* context)
+ : OperationManager(context) {}
MockOperationManager::~MockOperationManager() {}
ImageWriterUnitTestBase::ImageWriterUnitTestBase()
diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.h b/chrome/browser/extensions/api/image_writer_private/test_utils.h
index a19a48c..4f2043b 100644
--- a/chrome/browser/extensions/api/image_writer_private/test_utils.h
+++ b/chrome/browser/extensions/api/image_writer_private/test_utils.h
@@ -31,7 +31,7 @@ const int kDevicePattern = 0xAAAAAAAA; // 10101010
class MockOperationManager : public OperationManager {
public:
MockOperationManager();
- explicit MockOperationManager(Profile* profile);
+ explicit MockOperationManager(content::BrowserContext* context);
virtual ~MockOperationManager();
MOCK_METHOD3(OnProgress, void(const ExtensionId& extension_id,
diff --git a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h
index eb87b0c..2668321 100644
--- a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h
+++ b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h
@@ -11,6 +11,7 @@
namespace net {
class URLFetcher;
+class URLRequestContextGetter;
} // namespace net
namespace extensions {
diff --git a/chrome/browser/extensions/api/location/location_api.cc b/chrome/browser/extensions/api/location/location_api.cc
index cc17f70..81b6132 100644
--- a/chrome/browser/extensions/api/location/location_api.cc
+++ b/chrome/browser/extensions/api/location/location_api.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/api/location/location_api.h"
#include "chrome/browser/extensions/api/location/location_manager.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/location.h"
#include "extensions/common/error_utils.h"
diff --git a/chrome/browser/extensions/api/messaging/incognito_connectability.cc b/chrome/browser/extensions/api/messaging/incognito_connectability.cc
index 814f19f..194c66c 100644
--- a/chrome/browser/extensions/api/messaging/incognito_connectability.cc
+++ b/chrome/browser/extensions/api/messaging/incognito_connectability.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/simple_message_box.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
diff --git a/chrome/browser/extensions/api/processes/processes_api.cc b/chrome/browser/extensions/api/processes/processes_api.cc
index 5dd6035..06262e2 100644
--- a/chrome/browser/extensions/api/processes/processes_api.cc
+++ b/chrome/browser/extensions/api/processes/processes_api.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/extensions/extension_function_util.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/task_manager/resource_provider.h"
#include "chrome/browser/task_manager/task_manager.h"
#include "content/public/browser/browser_context.h"
diff --git a/chrome/browser/extensions/api/profile_keyed_api_factory.h b/chrome/browser/extensions/api/profile_keyed_api_factory.h
index 83f0d8c..6701e68 100644
--- a/chrome/browser/extensions/api/profile_keyed_api_factory.h
+++ b/chrome/browser/extensions/api/profile_keyed_api_factory.h
@@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_EXTENSIONS_API_PROFILE_KEYED_API_FACTORY_H_
#define CHROME_BROWSER_EXTENSIONS_API_PROFILE_KEYED_API_FACTORY_H_
-#include "chrome/browser/profiles/incognito_helpers.h"
-#include "chrome/browser/profiles/profile.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h"
@@ -61,15 +59,10 @@ class ProfileKeyedAPI : public BrowserContextKeyedService {
template <typename T>
class ProfileKeyedAPIFactory : public BrowserContextKeyedServiceFactory {
public:
- // TODO(yoz): Delete this one.
- static T* GetForProfile(Profile* profile) {
- return static_cast<T*>(
- T::GetFactoryInstance()->GetServiceForBrowserContext(profile, true));
- }
-
+ // TODO(yoz): Rename to Get().
static T* GetForProfile(content::BrowserContext* context) {
- return static_cast<T*>(T::GetFactoryInstance()->GetServiceForBrowserContext(
- Profile::FromBrowserContext(context), true));
+ return static_cast<T*>(
+ T::GetFactoryInstance()->GetServiceForBrowserContext(context, true));
}
// Declare dependencies on other factories.
@@ -99,8 +92,8 @@ class ProfileKeyedAPIFactory : public BrowserContextKeyedServiceFactory {
private:
// BrowserContextKeyedServiceFactory implementation.
virtual BrowserContextKeyedService* BuildServiceInstanceFor(
- content::BrowserContext* profile) const OVERRIDE {
- return new T(static_cast<Profile*>(profile));
+ content::BrowserContext* context) const OVERRIDE {
+ return new T(context);
}
// BrowserContextKeyedBaseFactory implementation.
@@ -108,10 +101,10 @@ class ProfileKeyedAPIFactory : public BrowserContextKeyedServiceFactory {
virtual content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const OVERRIDE {
if (T::kServiceRedirectedInIncognito)
- return chrome::GetBrowserContextRedirectedInIncognito(context);
+ return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
if (T::kServiceHasOwnInstanceInIncognito)
- return chrome::GetBrowserContextOwnInstanceInIncognito(context);
+ return context;
return BrowserContextKeyedServiceFactory::GetBrowserContextToUse(context);
}
diff --git a/chrome/browser/extensions/api/serial/serial_api.cc b/chrome/browser/extensions/api/serial/serial_api.cc
index cb5de19..694d051 100644
--- a/chrome/browser/extensions/api/serial/serial_api.cc
+++ b/chrome/browser/extensions/api/serial/serial_api.cc
@@ -9,6 +9,7 @@
#include "base/values.h"
#include "chrome/browser/extensions/api/serial/serial_connection.h"
#include "chrome/browser/extensions/api/serial/serial_event_dispatcher.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/serial.h"
#include "content/public/browser/browser_thread.h"
#include "device/serial/serial_device_enumerator.h"
diff --git a/chrome/browser/extensions/api/serial/serial_event_dispatcher.h b/chrome/browser/extensions/api/serial/serial_event_dispatcher.h
index f8a6244..34fd314 100644
--- a/chrome/browser/extensions/api/serial/serial_event_dispatcher.h
+++ b/chrome/browser/extensions/api/serial/serial_event_dispatcher.h
@@ -8,6 +8,8 @@
#include "chrome/browser/extensions/api/api_resource_manager.h"
#include "chrome/common/extensions/api/serial.h"
+class Profile;
+
namespace extensions {
struct Event;
diff --git a/chrome/browser/extensions/api/socket/socket_api.cc b/chrome/browser/extensions/api/socket/socket_api.cc
index 5b77498..293a385 100644
--- a/chrome/browser/extensions/api/socket/socket_api.cc
+++ b/chrome/browser/extensions/api/socket/socket_api.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/extensions/api/socket/tcp_socket.h"
#include "chrome/browser/extensions/api/socket/udp_socket.h"
#include "chrome/browser/io_thread.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/permissions/socket_permission.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
diff --git a/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_api.cc b/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_api.cc
index fbf02dc..2d1dd17 100644
--- a/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_api.cc
+++ b/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_api.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/extensions/api/socket/tcp_socket.h"
#include "chrome/browser/extensions/api/sockets_tcp/tcp_socket_event_dispatcher.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/sockets/sockets_manifest_data.h"
#include "content/public/common/socket_permission_request.h"
#include "net/base/net_errors.h"
diff --git a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api.cc b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api.cc
index 23dc3aa..8b98d6c 100644
--- a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api.cc
+++ b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/extensions/api/socket/tcp_socket.h"
#include "chrome/browser/extensions/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/sockets/sockets_manifest_data.h"
#include "chrome/common/extensions/permissions/socket_permission.h"
#include "content/public/common/socket_permission_request.h"
diff --git a/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc b/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc
index 37c350d..2e6f290 100644
--- a/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc
+++ b/chrome/browser/extensions/api/sockets_udp/sockets_udp_api.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/extensions/api/socket/udp_socket.h"
#include "chrome/browser/extensions/api/sockets_udp/udp_socket_event_dispatcher.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/sockets/sockets_manifest_data.h"
#include "content/public/common/socket_permission_request.h"
#include "net/base/net_errors.h"
diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
index 2d7175e..7bf7676 100644
--- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
+++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
@@ -10,7 +10,9 @@
#include "chrome/browser/extensions/api/tabs/tabs_constants.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
+#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/media_device_id.h"
+#include "content/public/browser/resource_context.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_system.h"
diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h
index 840888c..066ab39 100644
--- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h
+++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h
@@ -14,6 +14,10 @@
#include "media/audio/audio_device_name.h"
#include "url/gurl.h"
+namespace content {
+class ResourceContext;
+}
+
namespace extensions {
// Listens for device changes and forwards as an extension event.
diff --git a/chrome/browser/extensions/dev_mode_bubble_controller.cc b/chrome/browser/extensions/dev_mode_bubble_controller.cc
index 2bf7136..7b30512 100644
--- a/chrome/browser/extensions/dev_mode_bubble_controller.cc
+++ b/chrome/browser/extensions/dev_mode_bubble_controller.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/extensions/extension_action_manager.h"
#include "chrome/browser/extensions/extension_message_bubble.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/chrome_version_info.h"
diff --git a/chrome/browser/extensions/extension_message_bubble_controller.cc b/chrome/browser/extensions/extension_message_bubble_controller.cc
index 7eb4531..383d216 100644
--- a/chrome/browser/extensions/extension_message_bubble_controller.cc
+++ b/chrome/browser/extensions/extension_message_bubble_controller.cc
@@ -9,6 +9,7 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_message_bubble.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/url_constants.h"
diff --git a/chrome/browser/extensions/extension_message_bubble_controller.h b/chrome/browser/extensions/extension_message_bubble_controller.h
index 47a18b8..0365718 100644
--- a/chrome/browser/extensions/extension_message_bubble_controller.h
+++ b/chrome/browser/extensions/extension_message_bubble_controller.h
@@ -12,6 +12,7 @@
class Browser;
class ExtensionService;
+class Profile;
namespace extensions {
diff --git a/chrome/browser/extensions/extension_web_contents_observer.cc b/chrome/browser/extensions/extension_web_contents_observer.cc
index 608533a..b817d3c 100644
--- a/chrome/browser/extensions/extension_web_contents_observer.cc
+++ b/chrome/browser/extensions/extension_web_contents_observer.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/extensions/api/messaging/message_service.h"
#include "chrome/browser/extensions/error_console/error_console.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/messaging/message.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/render_messages.h"
diff --git a/chrome/browser/extensions/signin/scoped_gaia_auth_extension.cc b/chrome/browser/extensions/signin/scoped_gaia_auth_extension.cc
index 4c5f343..49d6fa2 100644
--- a/chrome/browser/extensions/signin/scoped_gaia_auth_extension.cc
+++ b/chrome/browser/extensions/signin/scoped_gaia_auth_extension.cc
@@ -5,18 +5,20 @@
#include "chrome/browser/extensions/signin/scoped_gaia_auth_extension.h"
#include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h"
+#include "content/public/browser/browser_context.h"
-ScopedGaiaAuthExtension::ScopedGaiaAuthExtension(Profile* profile)
- : profile_(profile) {
+ScopedGaiaAuthExtension::ScopedGaiaAuthExtension(
+ content::BrowserContext* context)
+ : browser_context_(context) {
extensions::GaiaAuthExtensionLoader* loader =
- extensions::GaiaAuthExtensionLoader::Get(profile_);
+ extensions::GaiaAuthExtensionLoader::Get(browser_context_);
if (loader)
loader->LoadIfNeeded();
}
ScopedGaiaAuthExtension::~ScopedGaiaAuthExtension() {
extensions::GaiaAuthExtensionLoader* loader =
- extensions::GaiaAuthExtensionLoader::Get(profile_);
+ extensions::GaiaAuthExtensionLoader::Get(browser_context_);
if (loader)
loader->UnloadIfNeeded();
}
diff --git a/chrome/browser/extensions/signin/scoped_gaia_auth_extension.h b/chrome/browser/extensions/signin/scoped_gaia_auth_extension.h
index cf3cf49..d032565 100644
--- a/chrome/browser/extensions/signin/scoped_gaia_auth_extension.h
+++ b/chrome/browser/extensions/signin/scoped_gaia_auth_extension.h
@@ -7,18 +7,20 @@
#include "base/basictypes.h"
-class Profile;
+namespace content {
+class BrowserContext;
+}
// ScopedGaiaAuthExtension loads gaia auth extension on construction if the
// extension is not registered yet, and unloads it on destruction if it is no
// longer used.
class ScopedGaiaAuthExtension {
public:
- explicit ScopedGaiaAuthExtension(Profile* profile);
+ explicit ScopedGaiaAuthExtension(content::BrowserContext* context);
~ScopedGaiaAuthExtension();
private:
- Profile* profile_;
+ content::BrowserContext* browser_context_;
DISALLOW_COPY_AND_ASSIGN(ScopedGaiaAuthExtension);
};
diff --git a/chrome/browser/speech/extension_api/tts_extension_api.cc b/chrome/browser/speech/extension_api/tts_extension_api.cc
index dcb5e3a..bd43ddb 100644
--- a/chrome/browser/speech/extension_api/tts_extension_api.cc
+++ b/chrome/browser/speech/extension_api/tts_extension_api.cc
@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_function_registry.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/speech/extension_api/tts_engine_extension_api.h"
#include "chrome/browser/speech/extension_api/tts_extension_api_constants.h"
#include "chrome/browser/speech/tts_controller.h"
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index fafa052..6b71d71 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -22,6 +22,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/location_bar_controller.h"
#include "chrome/browser/extensions/tab_helper.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_service.h"
#include "chrome/browser/search/instant_service_factory.h"
#include "chrome/browser/search/search.h"
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index c5c0134..07c1f7c 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -34,6 +34,7 @@
#include "chrome/browser/extensions/location_bar_controller.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_service.h"
#include "chrome/browser/search/instant_service_factory.h"
#include "chrome/browser/search_engines/template_url.h"
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index ce0ff79..f8a352c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/extensions/location_bar_controller.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_service.h"
#include "chrome/browser/search/instant_service_factory.h"
#include "chrome/browser/search/search.h"