diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-01 04:48:49 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-01 04:48:49 +0000 |
commit | c91775096768e4a75b23a910ddc1e33d9412a3be (patch) | |
tree | cb807f9b28d88b4950e41d32fbe73a5c81a94c40 /chrome | |
parent | e0eb450f398ae888aa0fbdb7fd3abc072d5846a2 (diff) | |
download | chromium_src-c91775096768e4a75b23a910ddc1e33d9412a3be.zip chromium_src-c91775096768e4a75b23a910ddc1e33d9412a3be.tar.gz chromium_src-c91775096768e4a75b23a910ddc1e33d9412a3be.tar.bz2 |
Move non_thread_safe from base to base/threading and into the base namespace.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/6005010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
23 files changed, 51 insertions, 47 deletions
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index c763d31..d5d3b51 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -15,7 +15,7 @@ #include "base/basictypes.h" #include "base/message_loop.h" -#include "base/non_thread_safe.h" +#include "base/threading/non_thread_safe.h" #include "base/timer.h" #include "base/scoped_ptr.h" #include "chrome/browser/browser_process.h" @@ -36,7 +36,7 @@ class TabCloseableStateWatcher; // Real implementation of BrowserProcess that creates and returns the services. class BrowserProcessImpl : public BrowserProcess, - public NonThreadSafe, + public base::NonThreadSafe, public NotificationObserver { public: explicit BrowserProcessImpl(const CommandLine& command_line); diff --git a/chrome/browser/chromeos/cros_settings.h b/chrome/browser/chromeos/cros_settings.h index 79428d2..c8446c5 100644 --- a/chrome/browser/chromeos/cros_settings.h +++ b/chrome/browser/chromeos/cros_settings.h @@ -10,9 +10,9 @@ #include <vector> #include "base/hash_tables.h" -#include "base/non_thread_safe.h" #include "base/observer_list.h" #include "base/singleton.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/chromeos/cros_settings_names.h" #include "chrome/common/notification_observer.h" @@ -27,7 +27,7 @@ namespace chromeos { class CrosSettingsProvider; // A class manages per-device/global settings. -class CrosSettings : public NonThreadSafe { +class CrosSettings : public base::NonThreadSafe { public: // Class factory. static CrosSettings* Get(); diff --git a/chrome/browser/geolocation/device_data_provider.h b/chrome/browser/geolocation/device_data_provider.h index b6a3882..f795d10 100644 --- a/chrome/browser/geolocation/device_data_provider.h +++ b/chrome/browser/geolocation/device_data_provider.h @@ -29,11 +29,11 @@ #include "base/basictypes.h" #include "base/message_loop.h" -#include "base/non_thread_safe.h" #include "base/ref_counted.h" #include "base/string16.h" #include "base/string_util.h" #include "base/task.h" +#include "base/threading/non_thread_safe.h" // The following data structures are used to store cell radio data and wifi // data. See the Geolocation API design document at @@ -264,7 +264,7 @@ typedef DeviceDataProviderImplBase<WifiData> WifiDataProviderImplBase; // location providers. These location providers access the instance through the // Register and Unregister methods. template<typename DataType> -class DeviceDataProvider : public NonThreadSafe { +class DeviceDataProvider : public base::NonThreadSafe { public: // Interface to be implemented by listeners to a device data provider. class ListenerInterface { diff --git a/chrome/browser/geolocation/location_provider.h b/chrome/browser/geolocation/location_provider.h index 6c4d8da..fe19b36 100644 --- a/chrome/browser/geolocation/location_provider.h +++ b/chrome/browser/geolocation/location_provider.h @@ -15,8 +15,8 @@ #pragma once #include <map> -#include "base/non_thread_safe.h" #include "base/string16.h" +#include "base/threading/non_thread_safe.h" class AccessTokenStore; struct Geoposition; @@ -24,7 +24,7 @@ class GURL; class URLRequestContextGetter; // The base class used by all location providers. -class LocationProviderBase : public NonThreadSafe { +class LocationProviderBase : public base::NonThreadSafe { public: // Clients of the location provider must implement this interface. All call- // backs to this interface will happen in the context of the thread on which diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h index 14edf88..e3bc66a 100644 --- a/chrome/browser/gpu_process_host.h +++ b/chrome/browser/gpu_process_host.h @@ -9,8 +9,8 @@ #include <queue> #include "base/basictypes.h" -#include "base/non_thread_safe.h" #include "base/ref_counted.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/browser_child_process_host.h" #include "gfx/native_widget_types.h" @@ -29,7 +29,8 @@ struct ChannelHandle; class Message; } -class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { +class GpuProcessHost : public BrowserChildProcessHost, + public base::NonThreadSafe { public: // Getter for the singleton. This will return NULL on failure. static GpuProcessHost* Get(); diff --git a/chrome/browser/gpu_process_host_ui_shim.h b/chrome/browser/gpu_process_host_ui_shim.h index f261093d..17bf970 100644 --- a/chrome/browser/gpu_process_host_ui_shim.h +++ b/chrome/browser/gpu_process_host_ui_shim.h @@ -12,9 +12,9 @@ // shuttling messages between the browser and GPU processes. #include "base/callback.h" -#include "base/non_thread_safe.h" #include "base/scoped_ptr.h" #include "base/singleton.h" +#include "base/threading/non_thread_safe.h" #include "chrome/common/gpu_info.h" #include "chrome/common/message_router.h" #include "ipc/ipc_channel.h" @@ -22,7 +22,7 @@ class GpuProcessHostUIShim : public IPC::Channel::Sender, public IPC::Channel::Listener, - public NonThreadSafe { + public base::NonThreadSafe { public: // Getter for the singleton. This will return NULL on failure. static GpuProcessHostUIShim* GetInstance(); diff --git a/chrome/browser/policy/asynchronous_policy_provider.h b/chrome/browser/policy/asynchronous_policy_provider.h index 561fc37..a6079dc 100644 --- a/chrome/browser/policy/asynchronous_policy_provider.h +++ b/chrome/browser/policy/asynchronous_policy_provider.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_POLICY_ASYNCHRONOUS_POLICY_PROVIDER_H_ #pragma once -#include "base/non_thread_safe.h" #include "base/ref_counted.h" +#include "base/threading/non_thread_safe.h" #include "base/weak_ptr.h" #include "chrome/browser/policy/configuration_policy_provider.h" @@ -21,7 +21,7 @@ class AsynchronousPolicyLoader; // policy is handled by a delegate passed at construction time. class AsynchronousPolicyProvider : public ConfigurationPolicyProvider, - public NonThreadSafe { + public base::NonThreadSafe { public: // Must be implemented by subclasses of the asynchronous policy provider to // provide the implementation details of how policy is loaded. diff --git a/chrome/browser/policy/device_management_backend.h b/chrome/browser/policy/device_management_backend.h index 24e7315..114c7b7 100644 --- a/chrome/browser/policy/device_management_backend.h +++ b/chrome/browser/policy/device_management_backend.h @@ -9,7 +9,7 @@ #include <string> #include "base/basictypes.h" -#include "base/non_thread_safe.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/policy/proto/device_management_backend.pb.h" namespace policy { @@ -20,7 +20,7 @@ namespace em = enterprise_management; // server, which provides services to register Chrome installations and CrOS // devices for the purpose of fetching centrally-administered policy from the // cloud. -class DeviceManagementBackend : NonThreadSafe { +class DeviceManagementBackend : base::NonThreadSafe { public: enum ErrorCode { // Request payload invalid. diff --git a/chrome/browser/prefs/pref_notifier_impl.h b/chrome/browser/prefs/pref_notifier_impl.h index 1d61830..085e547 100644 --- a/chrome/browser/prefs/pref_notifier_impl.h +++ b/chrome/browser/prefs/pref_notifier_impl.h @@ -9,8 +9,8 @@ #include <string> #include "base/hash_tables.h" -#include "base/non_thread_safe.h" #include "base/observer_list.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/prefs/pref_notifier.h" class PrefService; @@ -18,7 +18,7 @@ class NotificationObserver; // The PrefNotifier implementation used by the PrefService. class PrefNotifierImpl : public PrefNotifier, - public NonThreadSafe { + public base::NonThreadSafe { public: explicit PrefNotifierImpl(PrefService* pref_service); virtual ~PrefNotifierImpl(); diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h index 5485292..f17bbbd 100644 --- a/chrome/browser/prefs/pref_service.h +++ b/chrome/browser/prefs/pref_service.h @@ -11,9 +11,9 @@ #include <set> #include <string> -#include "base/non_thread_safe.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" +#include "base/threading/non_thread_safe.h" #include "base/values.h" class DefaultPrefStore; @@ -31,7 +31,7 @@ namespace subtle { class PrefMemberBase; }; -class PrefService : public NonThreadSafe { +class PrefService : public base::NonThreadSafe { public: // A helper class to store all the information associated with a preference. class Preference { diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h index 045581c..2c49e68 100644 --- a/chrome/browser/prerender/prerender_manager.h +++ b/chrome/browser/prerender/prerender_manager.h @@ -8,8 +8,8 @@ #include <list> -#include "base/non_thread_safe.h" #include "base/scoped_ptr.h" +#include "base/threading/non_thread_safe.h" #include "base/time.h" #include "googleurl/src/gurl.h" @@ -19,7 +19,7 @@ class TabContents; // PrerenderManager is responsible for initiating and keeping prerendered // views of webpages. -class PrerenderManager : NonThreadSafe { +class PrerenderManager : base::NonThreadSafe { public: // Owned by a Profile object for the lifetime of the profile. explicit PrerenderManager(Profile* profile); diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h index 250d96bd..9418c60 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -14,8 +14,8 @@ #include "base/basictypes.h" #include "base/logging.h" -#include "base/non_thread_safe.h" #include "base/ref_counted.h" +#include "base/threading/non_thread_safe.h" #include "gfx/native_widget_types.h" #if defined(OS_POSIX) @@ -40,7 +40,7 @@ class FilePath; // - the Windows implementation uses an invisible global message window; // - the Linux implementation uses a Unix domain socket in the user data dir. -class ProcessSingleton : public NonThreadSafe { +class ProcessSingleton : public base::NonThreadSafe { public: enum NotifyResult { PROCESS_NONE, diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h index d46c900..1d6483d 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h @@ -13,14 +13,14 @@ #include "app/system_monitor.h" #include "base/basictypes.h" #include "base/message_loop.h" -#include "base/non_thread_safe.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" class FilePath; -class ProfileManager : public NonThreadSafe, +class ProfileManager : public base::NonThreadSafe, public SystemMonitor::PowerObserver, public NotificationObserver { public: diff --git a/chrome/browser/ssl/ssl_host_state.h b/chrome/browser/ssl/ssl_host_state.h index 43880f3..a23a239 100644 --- a/chrome/browser/ssl/ssl_host_state.h +++ b/chrome/browser/ssl/ssl_host_state.h @@ -11,7 +11,7 @@ #include <set> #include "base/basictypes.h" -#include "base/non_thread_safe.h" +#include "base/threading/non_thread_safe.h" #include "googleurl/src/gurl.h" #include "net/base/x509_certificate.h" @@ -23,7 +23,7 @@ // from the SSLManager because this state is shared across many navigation // controllers. -class SSLHostState : public NonThreadSafe { +class SSLHostState : public base::NonThreadSafe { public: SSLHostState(); ~SSLHostState(); diff --git a/chrome/browser/sync/glue/session_model_associator.h b/chrome/browser/sync/glue/session_model_associator.h index 502af18..f2909af 100644 --- a/chrome/browser/sync/glue/session_model_associator.h +++ b/chrome/browser/sync/glue/session_model_associator.h @@ -13,6 +13,7 @@ #include "base/gtest_prod_util.h" #include "base/observer_list.h" #include "base/scoped_vector.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sessions/session_types.h" #include "chrome/browser/sync/engine/syncapi.h" @@ -44,8 +45,10 @@ static const char kSessionsTag[] = "google_chrome_sessions"; // that gets overwritten everytime there is an update. From it, we build a new // foreign session windows list each time |GetSessionData| is called by the // ForeignSessionHandler. -class SessionModelAssociator : public PerDataTypeAssociatorInterface< - sync_pb::SessionSpecifics, std::string>, public NonThreadSafe { +class SessionModelAssociator + : public PerDataTypeAssociatorInterface<sync_pb::SessionSpecifics, + std::string>, + public base::NonThreadSafe { public: // Does not take ownership of sync_service. @@ -60,7 +63,7 @@ class SessionModelAssociator : public PerDataTypeAssociatorInterface< // Dummy method, we do everything all-at-once in UpdateFromSyncModel. virtual void Associate(const sync_pb::SessionSpecifics* specifics, - int64 sync_id) { + int64 sync_id) { } // Updates the sync model with the local client data. (calls diff --git a/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h b/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h index ac2d0c4..a879836 100644 --- a/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h +++ b/chrome/browser/sync/notifier/cache_invalidation_packet_handler.h @@ -13,8 +13,8 @@ #include "base/basictypes.h" #include "base/gtest_prod_util.h" -#include "base/non_thread_safe.h" #include "base/scoped_callback_factory.h" +#include "base/threading/non_thread_safe.h" #include "base/weak_ptr.h" namespace invalidation { @@ -52,7 +52,7 @@ class CacheInvalidationPacketHandler { void HandleInboundPacket(const std::string& packet); - NonThreadSafe non_thread_safe_; + base::NonThreadSafe non_thread_safe_; base::ScopedCallbackFactory<CacheInvalidationPacketHandler> scoped_callback_factory_; diff --git a/chrome/browser/sync/notifier/chrome_invalidation_client.h b/chrome/browser/sync/notifier/chrome_invalidation_client.h index e408085..99af02c 100644 --- a/chrome/browser/sync/notifier/chrome_invalidation_client.h +++ b/chrome/browser/sync/notifier/chrome_invalidation_client.h @@ -12,9 +12,9 @@ #include <string> #include "base/basictypes.h" -#include "base/non_thread_safe.h" #include "base/scoped_callback_factory.h" #include "base/scoped_ptr.h" +#include "base/threading/non_thread_safe.h" #include "base/weak_ptr.h" #include "chrome/browser/sync/notifier/chrome_system_resources.h" #include "chrome/browser/sync/notifier/state_writer.h" @@ -99,7 +99,7 @@ class ChromeInvalidationClient void HandleOutboundPacket( invalidation::NetworkEndpoint* const& network_endpoint); - NonThreadSafe non_thread_safe_; + base::NonThreadSafe non_thread_safe_; ChromeSystemResources chrome_system_resources_; base::ScopedCallbackFactory<ChromeInvalidationClient> scoped_callback_factory_; diff --git a/chrome/browser/sync/notifier/chrome_system_resources.h b/chrome/browser/sync/notifier/chrome_system_resources.h index b6e6256..06b8001 100644 --- a/chrome/browser/sync/notifier/chrome_system_resources.h +++ b/chrome/browser/sync/notifier/chrome_system_resources.h @@ -14,9 +14,9 @@ #include <string> #include "base/message_loop.h" -#include "base/non_thread_safe.h" #include "base/scoped_ptr.h" #include "base/task.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/sync/notifier/state_writer.h" #include "google/cacheinvalidation/invalidation-client.h" @@ -52,7 +52,7 @@ class ChromeSystemResources : public invalidation::SystemResources { invalidation::StorageCallback* callback); private: - NonThreadSafe non_thread_safe_; + base::NonThreadSafe non_thread_safe_; scoped_ptr<ScopedRunnableMethodFactory<ChromeSystemResources> > scoped_runnable_method_factory_; // Holds all posted tasks that have not yet been run. diff --git a/chrome/browser/sync/notifier/registration_manager.h b/chrome/browser/sync/notifier/registration_manager.h index 1b1a534..2694373 100644 --- a/chrome/browser/sync/notifier/registration_manager.h +++ b/chrome/browser/sync/notifier/registration_manager.h @@ -12,7 +12,7 @@ #include <map> #include "base/basictypes.h" -#include "base/non_thread_safe.h" +#include "base/threading/non_thread_safe.h" #include "chrome/browser/sync/syncable/model_type.h" #include "google/cacheinvalidation/invalidation-client.h" @@ -54,7 +54,7 @@ class RegistrationManager { void OnRegister(const invalidation::RegistrationUpdateResult& result); - NonThreadSafe non_thread_safe_; + base::NonThreadSafe non_thread_safe_; // Weak pointer. invalidation::InvalidationClient* invalidation_client_; RegistrationStatusMap registration_status_; diff --git a/chrome/browser/themes/browser_theme_provider.h b/chrome/browser/themes/browser_theme_provider.h index cddd153..e400a1f 100644 --- a/chrome/browser/themes/browser_theme_provider.h +++ b/chrome/browser/themes/browser_theme_provider.h @@ -11,8 +11,8 @@ #include <string> #include "app/theme_provider.h" -#include "base/non_thread_safe.h" #include "base/ref_counted.h" +#include "base/threading/non_thread_safe.h" namespace color_utils { struct HSL; @@ -32,7 +32,7 @@ class ResourceBundle; extern "C" NSString* const kBrowserThemeDidChangeNotification; #endif // __OBJC__ -class BrowserThemeProvider : public NonThreadSafe, +class BrowserThemeProvider : public base::NonThreadSafe, public ThemeProvider { public: // Public constants used in BrowserThemeProvider and its subclasses: diff --git a/chrome/common/chrome_plugin_util.h b/chrome/common/chrome_plugin_util.h index 5e78245..9769a76 100644 --- a/chrome/common/chrome_plugin_util.h +++ b/chrome/common/chrome_plugin_util.h @@ -9,8 +9,8 @@ #include <string> #include "base/basictypes.h" -#include "base/non_thread_safe.h" #include "base/ref_counted.h" +#include "base/threading/non_thread_safe.h" #include "chrome/common/chrome_plugin_api.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" @@ -41,7 +41,7 @@ struct ScopableCPRequest : public CPRequest { // the plugin unloads. This object also verifies that it is created and // destroyed on the same thread. class PluginHelper : public NotificationObserver, - public NonThreadSafe { + public base::NonThreadSafe { public: static void DestroyAllHelpersForPlugin(ChromePluginLib* plugin); diff --git a/chrome/common/important_file_writer.h b/chrome/common/important_file_writer.h index 5fdabce..34c6067 100644 --- a/chrome/common/important_file_writer.h +++ b/chrome/common/important_file_writer.h @@ -10,8 +10,8 @@ #include "base/basictypes.h" #include "base/file_path.h" -#include "base/non_thread_safe.h" #include "base/ref_counted.h" +#include "base/threading/non_thread_safe.h" #include "base/time.h" #include "base/timer.h" @@ -36,7 +36,7 @@ class Thread; // // If you want to know more about this approach and ext3/ext4 fsync issues, see // http://valhenson.livejournal.com/37921.html -class ImportantFileWriter : public NonThreadSafe { +class ImportantFileWriter : public base::NonThreadSafe { public: // Used by ScheduleSave to lazily provide the data to be saved. Allows us // to also batch data serializations. diff --git a/chrome/service/cloud_print/cloud_print_proxy.h b/chrome/service/cloud_print/cloud_print_proxy.h index a5832f2..d30957e 100644 --- a/chrome/service/cloud_print/cloud_print_proxy.h +++ b/chrome/service/cloud_print/cloud_print_proxy.h @@ -9,8 +9,8 @@ #include <string> #include "base/basictypes.h" -#include "base/non_thread_safe.h" #include "base/scoped_ptr.h" +#include "base/threading/non_thread_safe.h" #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" class ServiceProcessPrefs; @@ -18,7 +18,7 @@ class ServiceProcessPrefs; // CloudPrintProxy is the layer between the service process UI thread // and the cloud print proxy backend. class CloudPrintProxy : public CloudPrintProxyFrontend, - public NonThreadSafe { + public base::NonThreadSafe { public: class Client { public: |