diff options
Diffstat (limited to 'chrome/browser/policy')
52 files changed, 130 insertions, 71 deletions
diff --git a/chrome/browser/policy/chrome_browser_policy_connector.cc b/chrome/browser/policy/chrome_browser_policy_connector.cc index 5f19b2a..3f2d438 100644 --- a/chrome/browser/policy/chrome_browser_policy_connector.cc +++ b/chrome/browser/policy/chrome_browser_policy_connector.cc @@ -13,6 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/strings/sys_string_conversions.h" +#include "build/build_config.h" #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" #include "chrome/browser/policy/device_management_service_configuration.h" #include "chrome/common/chrome_paths.h" diff --git a/chrome/browser/policy/chrome_browser_policy_connector.h b/chrome/browser/policy/chrome_browser_policy_connector.h index ba24431..d48a159 100644 --- a/chrome/browser/policy/chrome_browser_policy_connector.h +++ b/chrome/browser/policy/chrome_browser_policy_connector.h @@ -5,7 +5,9 @@ #ifndef CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_ #define CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_ -#include "base/basictypes.h" +#include <stdint.h> + +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "components/policy/core/browser/browser_policy_connector.h" @@ -25,7 +27,7 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector { public: // Service initialization delay time in millisecond on startup. (So that // displaying Chrome's GUI does not get delayed.) - static const int64 kServiceInitializationStartupDelay = 5000; + static const int64_t kServiceInitializationStartupDelay = 5000; // Builds an uninitialized ChromeBrowserPolicyConnector, suitable for testing. // Init() should be called to create and start the policy machinery. diff --git a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc index 5f454cc..b06aeb7 100644 --- a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc @@ -13,6 +13,7 @@ #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/invalidation/fake_invalidation_service.h" diff --git a/chrome/browser/policy/cloud/cloud_policy_invalidator.cc b/chrome/browser/policy/cloud/cloud_policy_invalidator.cc index 0947a24..97bf3e0 100644 --- a/chrome/browser/policy/cloud/cloud_policy_invalidator.cc +++ b/chrome/browser/policy/cloud/cloud_policy_invalidator.cc @@ -35,7 +35,7 @@ CloudPolicyInvalidator::CloudPolicyInvalidator( CloudPolicyCore* core, const scoped_refptr<base::SequencedTaskRunner>& task_runner, scoped_ptr<base::Clock> clock, - int64 highest_handled_invalidation_version) + int64_t highest_handled_invalidation_version) : state_(UNINITIALIZED), type_(type), core_(core), @@ -167,7 +167,7 @@ void CloudPolicyInvalidator::OnStoreLoaded(CloudPolicyStore* store) { METRIC_POLICY_REFRESH_SIZE); } - const int64 store_invalidation_version = store->invalidation_version(); + const int64_t store_invalidation_version = store->invalidation_version(); // If the policy was invalid and the version stored matches the latest // invalidation version, acknowledge the latest invalidation. @@ -212,7 +212,7 @@ void CloudPolicyInvalidator::HandleInvalidation( // numbers based on the number of such invalidations received. This // ensures that the version numbers do not collide with "real" versions // (which are positive) or previous invalidations with unknown version. - int64 version; + int64_t version; std::string payload; if (invalidation.is_unknown_version()) { version = -(++unknown_version_invalidation_count_); @@ -380,7 +380,7 @@ bool CloudPolicyInvalidator::IsPolicyChanged( const enterprise_management::PolicyData* policy) { // Determine if the policy changed by comparing its hash value to the // previous policy's hash value. - uint32 new_hash_value = 0; + uint32_t new_hash_value = 0; if (policy && policy->has_policy_value()) new_hash_value = base::Hash(policy->policy_value()); bool changed = new_hash_value != policy_hash_value_; @@ -388,7 +388,7 @@ bool CloudPolicyInvalidator::IsPolicyChanged( return changed; } -bool CloudPolicyInvalidator::IsInvalidationExpired(int64 version) { +bool CloudPolicyInvalidator::IsInvalidationExpired(int64_t version) { base::Time last_fetch_time = base::Time::UnixEpoch() + base::TimeDelta::FromMilliseconds(core_->store()->policy()->timestamp()); diff --git a/chrome/browser/policy/cloud/cloud_policy_invalidator.h b/chrome/browser/policy/cloud/cloud_policy_invalidator.h index fa89d12..8932c4e 100644 --- a/chrome/browser/policy/cloud/cloud_policy_invalidator.h +++ b/chrome/browser/policy/cloud/cloud_policy_invalidator.h @@ -5,12 +5,14 @@ #ifndef CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ #define CHROME_BROWSER_POLICY_CLOUD_CLOUD_POLICY_INVALIDATOR_H_ +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" @@ -72,7 +74,7 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, CloudPolicyCore* core, const scoped_refptr<base::SequencedTaskRunner>& task_runner, scoped_ptr<base::Clock> clock, - int64 highest_handled_invalidation_version); + int64_t highest_handled_invalidation_version); ~CloudPolicyInvalidator() override; // Initializes the invalidator. No invalidations will be generated before this @@ -91,7 +93,7 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, } // The highest invalidation version that was handled already. - int64 highest_handled_invalidation_version() const { + int64_t highest_handled_invalidation_version() const { return highest_handled_invalidation_version_; } @@ -150,7 +152,7 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, // Determine if an invalidation has expired. // |version| is the version of the invalidation, or zero for unknown. - bool IsInvalidationExpired(int64 version); + bool IsInvalidationExpired(int64_t version); // Get the kMetricPolicyRefresh histogram metric which should be incremented // when a policy is stored. @@ -212,7 +214,7 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, // The version of the latest invalidation received. This is compared to // the invalidation version of policy stored to determine when the // invalidated policy is up-to-date. - int64 invalidation_version_; + int64_t invalidation_version_; // The number of invalidations with unknown version received. Since such // invalidations do not provide a version number, this count is used to set @@ -220,7 +222,7 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, int unknown_version_invalidation_count_; // The highest invalidation version that was handled already. - int64 highest_handled_invalidation_version_; + int64_t highest_handled_invalidation_version_; // The most up to date invalidation. scoped_ptr<syncer::Invalidation> invalidation_; @@ -231,7 +233,7 @@ class CloudPolicyInvalidator : public syncer::InvalidationHandler, // The hash value of the current policy. This is used to determine if a new // policy is different from the current one. - uint32 policy_hash_value_; + uint32_t policy_hash_value_; // A thread checker to make sure that callbacks are invoked on the correct // thread. diff --git a/chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc b/chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc index d741b97..a83962a 100644 --- a/chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc +++ b/chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include <string> -#include "base/basictypes.h" #include "base/bind.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/metrics/histogram.h" @@ -17,6 +19,7 @@ #include "base/test/test_simple_task_runner.h" #include "base/time/time.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/invalidation/fake_invalidation_service.h" #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h" #include "chrome/browser/policy/cloud/user_cloud_policy_invalidator.h" @@ -56,7 +59,7 @@ class CloudPolicyInvalidatorTest : public testing::Test { // that was handled already before this invalidator was created. void StartInvalidator(bool initialize, bool start_refresh_scheduler, - int64 highest_handled_invalidation_version); + int64_t highest_handled_invalidation_version); void StartInvalidator() { StartInvalidator(true, /* initialize */ true, /* start_refresh_scheduler */ @@ -89,21 +92,19 @@ class CloudPolicyInvalidatorTest : public testing::Test { // |policy_changed| determines whether a policy value different from the // current value will be stored. // |time| determines the timestamp the store will report. - void StorePolicy( - PolicyObject object, - int64 invalidation_version, - bool policy_changed, - const base::Time& time); - void StorePolicy( - PolicyObject object, - int64 invalidation_version, - bool policy_changed) { + void StorePolicy(PolicyObject object, + int64_t invalidation_version, + bool policy_changed, + const base::Time& time); + void StorePolicy(PolicyObject object, + int64_t invalidation_version, + bool policy_changed) { StorePolicy(object, invalidation_version, policy_changed, Now() - base::TimeDelta::FromMinutes(5)); } - void StorePolicy(PolicyObject object, int64 invalidation_version) { + void StorePolicy(PolicyObject object, int64_t invalidation_version) { StorePolicy(object, invalidation_version, false); } void StorePolicy(PolicyObject object) { @@ -117,17 +118,16 @@ class CloudPolicyInvalidatorTest : public testing::Test { void EnableInvalidationService(); // Causes the invalidation service to fire an invalidation. - syncer::Invalidation FireInvalidation( - PolicyObject object, - int64 version, - const std::string& payload); + syncer::Invalidation FireInvalidation(PolicyObject object, + int64_t version, + const std::string& payload); // Causes the invalidation service to fire an invalidation with unknown // version. syncer::Invalidation FireUnknownVersionInvalidation(PolicyObject object); // Checks the expected value of the currently set invalidation info. - bool CheckInvalidationInfo(int64 version, const std::string& payload); + bool CheckInvalidationInfo(int64_t version, const std::string& payload); // Checks that the policy was not refreshed due to an invalidation. bool CheckPolicyNotRefreshed(); @@ -154,7 +154,7 @@ class CloudPolicyInvalidatorTest : public testing::Test { // Returns the highest invalidation version that was handled already according // to the |invalidator_|. - int64 GetHighestHandledInvalidationVersion() const; + int64_t GetHighestHandledInvalidationVersion() const; // Advance the test clock. void AdvanceClock(base::TimeDelta delta); @@ -164,10 +164,10 @@ class CloudPolicyInvalidatorTest : public testing::Test { // Translate a version number into an appropriate invalidation version (which // is based on the current time). - int64 V(int version); + int64_t V(int version); // Get an invalidation version for the given time. - int64 GetVersion(base::Time time); + int64_t GetVersion(base::Time time); // Get the policy type that the |invalidator_| is responsible for. virtual em::DeviceRegisterRequest::Type GetPolicyType() const; @@ -235,7 +235,7 @@ void CloudPolicyInvalidatorTest::TearDown() { void CloudPolicyInvalidatorTest::StartInvalidator( bool initialize, bool start_refresh_scheduler, - int64 highest_handled_invalidation_version) { + int64_t highest_handled_invalidation_version) { invalidator_.reset(new CloudPolicyInvalidator( GetPolicyType(), &core_, @@ -277,11 +277,10 @@ void CloudPolicyInvalidatorTest::DisconnectCore() { core_.Disconnect(); } -void CloudPolicyInvalidatorTest::StorePolicy( - PolicyObject object, - int64 invalidation_version, - bool policy_changed, - const base::Time& time) { +void CloudPolicyInvalidatorTest::StorePolicy(PolicyObject object, + int64_t invalidation_version, + bool policy_changed, + const base::Time& time) { em::PolicyData* data = new em::PolicyData(); if (object != POLICY_OBJECT_NONE) { data->set_invalidation_source(GetPolicyObjectId(object).source()); @@ -318,7 +317,7 @@ void CloudPolicyInvalidatorTest::EnableInvalidationService() { syncer::Invalidation CloudPolicyInvalidatorTest::FireInvalidation( PolicyObject object, - int64 version, + int64_t version, const std::string& payload) { syncer::Invalidation invalidation = syncer::Invalidation::Init( GetPolicyObjectId(object), @@ -337,7 +336,7 @@ syncer::Invalidation CloudPolicyInvalidatorTest::FireUnknownVersionInvalidation( } bool CloudPolicyInvalidatorTest::CheckInvalidationInfo( - int64 version, + int64_t version, const std::string& payload) { MockCloudPolicyClient* client = static_cast<MockCloudPolicyClient*>(core_.client()); @@ -383,7 +382,8 @@ bool CloudPolicyInvalidatorTest::IsInvalidatorRegistered() { .GetRegisteredIds(invalidator_.get()).empty(); } -int64 CloudPolicyInvalidatorTest::GetHighestHandledInvalidationVersion() const { +int64_t CloudPolicyInvalidatorTest::GetHighestHandledInvalidationVersion() + const { return invalidator_->highest_handled_invalidation_version(); } @@ -395,11 +395,11 @@ base::Time CloudPolicyInvalidatorTest::Now() { return clock_->Now(); } -int64 CloudPolicyInvalidatorTest::V(int version) { +int64_t CloudPolicyInvalidatorTest::V(int version) { return GetVersion(Now()) + version; } -int64 CloudPolicyInvalidatorTest::GetVersion(base::Time time) { +int64_t CloudPolicyInvalidatorTest::GetVersion(base::Time time) { return (time - base::Time::UnixEpoch()).InMicroseconds(); } diff --git a/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc index 9c63d1a..26bb250 100644 --- a/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc +++ b/chrome/browser/policy/cloud/cloud_policy_manager_browsertest.cc @@ -5,6 +5,7 @@ #include "base/command_line.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/policy/cloud/test_request_interceptor.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc index e7dc335..24558f5 100644 --- a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc @@ -11,6 +11,7 @@ #include "base/memory/ref_counted.h" #include "base/path_service.h" #include "base/run_loop.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/policy/profile_policy_connector.h" diff --git a/chrome/browser/policy/cloud/device_management_service_browsertest.cc b/chrome/browser/policy/cloud/device_management_service_browsertest.cc index cfe06fd..cee468e 100644 --- a/chrome/browser/policy/cloud/device_management_service_browsertest.cc +++ b/chrome/browser/policy/cloud/device_management_service_browsertest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/memory/scoped_ptr.h" @@ -39,7 +41,7 @@ namespace { // Parses the DeviceManagementRequest in |request_data| and writes a serialized // DeviceManagementResponse to |response_data|. void ConstructResponse(const char* request_data, - uint64 request_data_length, + uint64_t request_data_length, std::string* response_data) { em::DeviceManagementRequest request; ASSERT_TRUE(request.ParseFromArray(request_data, request_data_length)); diff --git a/chrome/browser/policy/cloud/policy_header_service_factory.cc b/chrome/browser/policy/cloud/policy_header_service_factory.cc index 86cbb37..759faff 100644 --- a/chrome/browser/policy/cloud/policy_header_service_factory.cc +++ b/chrome/browser/policy/cloud/policy_header_service_factory.cc @@ -5,6 +5,7 @@ #include "chrome/browser/policy/cloud/policy_header_service_factory.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" diff --git a/chrome/browser/policy/cloud/policy_header_service_factory.h b/chrome/browser/policy/cloud/policy_header_service_factory.h index f81ec93..22bee05 100644 --- a/chrome/browser/policy/cloud/policy_header_service_factory.h +++ b/chrome/browser/policy/cloud/policy_header_service_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_ #define CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/policy/cloud/remote_commands_invalidator_unittest.cc b/chrome/browser/policy/cloud/remote_commands_invalidator_unittest.cc index e1da6ef..b18930b 100644 --- a/chrome/browser/policy/cloud/remote_commands_invalidator_unittest.cc +++ b/chrome/browser/policy/cloud/remote_commands_invalidator_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/browser/policy/cloud/remote_commands_invalidator.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "chrome/browser/invalidation/fake_invalidation_service.h" diff --git a/chrome/browser/policy/cloud/test_request_interceptor.cc b/chrome/browser/policy/cloud/test_request_interceptor.cc index 458fc06..d1da15a 100644 --- a/chrome/browser/policy/cloud/test_request_interceptor.cc +++ b/chrome/browser/policy/cloud/test_request_interceptor.cc @@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" #include "base/sequenced_task_runner.h" diff --git a/chrome/browser/policy/cloud/test_request_interceptor.h b/chrome/browser/policy/cloud/test_request_interceptor.h index 858af64..e3539e2 100644 --- a/chrome/browser/policy/cloud/test_request_interceptor.h +++ b/chrome/browser/policy/cloud/test_request_interceptor.h @@ -5,10 +5,12 @@ #ifndef CHROME_BROWSER_POLICY_CLOUD_TEST_REQUEST_INTERCEPTOR_H_ #define CHROME_BROWSER_POLICY_CLOUD_TEST_REQUEST_INTERCEPTOR_H_ +#include <stddef.h> + #include <string> -#include "base/basictypes.h" #include "base/callback.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "policy/proto/device_management_backend.pb.h" diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc index 76953a4..95784b642 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc +++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc @@ -8,6 +8,7 @@ #include "base/memory/scoped_ptr.h" #include "base/thread_task_runner_handle.h" #include "base/time/default_clock.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" #include "components/invalidation/impl/profile_invalidation_provider.h" diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h index 82e19ed..eb1de93 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h +++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_INVALIDATOR_H_ #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_INVALIDATOR_H_ +#include "base/macros.h" #include "chrome/browser/policy/cloud/cloud_policy_invalidator.h" #include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc index 9ef12e4..93c608a 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc +++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc @@ -4,6 +4,7 @@ #include "chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h" +#include "build/build_config.h" #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" #include "chrome/browser/policy/cloud/user_cloud_policy_invalidator.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h index bbb9004..7ea3d27 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h +++ b/chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_INVALIDATOR_FACTORY_H_ #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_INVALIDATOR_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc index e2bec6f..867e06b 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc +++ b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.cc @@ -6,6 +6,7 @@ #include "base/files/file_path.h" #include "base/logging.h" +#include "base/macros.h" #include "base/sequenced_task_runner.h" #include "base/thread_task_runner_handle.h" #include "chrome/browser/policy/schema_registry_service.h" diff --git a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h index 3ae0414..0f85de9 100644 --- a/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h +++ b/chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h @@ -7,7 +7,7 @@ #include <map> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_base_factory.h" diff --git a/chrome/browser/policy/cloud/user_policy_signin_service.h b/chrome/browser/policy/cloud/user_policy_signin_service.h index 6c0b0e3..fea47f9 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service.h @@ -7,8 +7,8 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/policy/cloud/user_policy_signin_service_base.h" diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_base.cc b/chrome/browser/policy/cloud/user_policy_signin_service_base.cc index df3abca..ce937c2 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_base.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_base.cc @@ -8,6 +8,7 @@ #include "base/location.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" +#include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_base.h b/chrome/browser/policy/cloud/user_policy_signin_service_base.h index 2248d9c..9e0cf6c2 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_base.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service_base.h @@ -7,9 +7,9 @@ #include <string> -#include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc b/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc index 40e831e..70c580b 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_factory.cc @@ -6,6 +6,7 @@ #include "base/memory/ref_counted.h" #include "base/prefs/pref_service.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_factory.h b/chrome/browser/policy/cloud/user_policy_signin_service_factory.h index 4801b49..dcef00d 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_factory.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service_factory.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ #define CHROME_BROWSER_POLICY_CLOUD_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ +#include "base/macros.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc index ae35fd9..dec573e 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.cc @@ -11,6 +11,7 @@ #include "base/message_loop/message_loop.h" #include "base/prefs/pref_service.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.h b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.h index 56d6958..5828540 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_mobile.h +++ b/chrome/browser/policy/cloud/user_policy_signin_service_mobile.h @@ -8,11 +8,12 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" +#include "build/build_config.h" #include "chrome/browser/policy/cloud/user_policy_signin_service_base.h" class ProfileOAuth2TokenService; diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc index 3295fc7..54628c2 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc @@ -8,6 +8,7 @@ #include "base/run_loop.h" #include "base/thread_task_runner_handle.h" #include "base/time/time.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index 17c807e..a7d1666 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -4,11 +4,14 @@ #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" -#include "base/basictypes.h" +#include <stddef.h> + #include "base/bind.h" +#include "base/macros.h" #include "base/memory/scoped_vector.h" #include "base/prefs/pref_value_map.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/policy/managed_bookmarks_policy_handler.h" #include "chrome/browser/profiles/incognito_mode_policy_handler.h" #include "chrome/common/chrome_switches.h" diff --git a/chrome/browser/policy/device_management_service_configuration.cc b/chrome/browser/policy/device_management_service_configuration.cc index a47805e..1b8200b 100644 --- a/chrome/browser/policy/device_management_service_configuration.cc +++ b/chrome/browser/policy/device_management_service_configuration.cc @@ -4,10 +4,12 @@ #include "chrome/browser/policy/device_management_service_configuration.h" -#include "base/basictypes.h" +#include <stdint.h> + #include "base/logging.h" #include "base/strings/stringprintf.h" #include "base/sys_info.h" +#include "build/build_config.h" #include "components/policy/core/browser/browser_policy_connector.h" #include "components/version_info/version_info.h" @@ -55,9 +57,9 @@ std::string DeviceManagementServiceConfiguration::GetPlatformParameter() { std::string os_version("-"); #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) - int32 os_major_version = 0; - int32 os_minor_version = 0; - int32 os_bugfix_version = 0; + int32_t os_major_version = 0; + int32_t os_minor_version = 0; + int32_t os_bugfix_version = 0; base::SysInfo::OperatingSystemVersionNumbers(&os_major_version, &os_minor_version, &os_bugfix_version); diff --git a/chrome/browser/policy/file_selection_dialogs_policy_handler.h b/chrome/browser/policy/file_selection_dialogs_policy_handler.h index b5b95d9..dbe333b 100644 --- a/chrome/browser/policy/file_selection_dialogs_policy_handler.h +++ b/chrome/browser/policy/file_selection_dialogs_policy_handler.h @@ -5,8 +5,8 @@ #ifndef CHROME_BROWSER_POLICY_FILE_SELECTION_DIALOGS_POLICY_HANDLER_H_ #define CHROME_BROWSER_POLICY_FILE_SELECTION_DIALOGS_POLICY_HANDLER_H_ -#include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/macros.h" #include "components/policy/core/browser/configuration_policy_handler.h" namespace policy { diff --git a/chrome/browser/policy/javascript_policy_handler.h b/chrome/browser/policy/javascript_policy_handler.h index e7ce805..8b1c6c0 100644 --- a/chrome/browser/policy/javascript_policy_handler.h +++ b/chrome/browser/policy/javascript_policy_handler.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_JAVASCRIPT_POLICY_HANDLER_H_ #define CHROME_BROWSER_POLICY_JAVASCRIPT_POLICY_HANDLER_H_ +#include "base/macros.h" #include "components/policy/core/browser/configuration_policy_handler.h" class PrefValueMap; diff --git a/chrome/browser/policy/managed_bookmarks_policy_handler.h b/chrome/browser/policy/managed_bookmarks_policy_handler.h index bbe09cb..fc2b001 100644 --- a/chrome/browser/policy/managed_bookmarks_policy_handler.h +++ b/chrome/browser/policy/managed_bookmarks_policy_handler.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ #define CHROME_BROWSER_POLICY_MANAGED_BOOKMARKS_POLICY_HANDLER_H_ +#include "base/macros.h" #include "components/policy/core/browser/configuration_policy_handler.h" namespace base { diff --git a/chrome/browser/policy/network_prediction_policy_handler.h b/chrome/browser/policy/network_prediction_policy_handler.h index 9a8d3e4..af6671f 100644 --- a/chrome/browser/policy/network_prediction_policy_handler.h +++ b/chrome/browser/policy/network_prediction_policy_handler.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_NETWORK_PREDICTION_POLICY_HANDLER_H_ #define CHROME_BROWSER_POLICY_NETWORK_PREDICTION_POLICY_HANDLER_H_ +#include "base/macros.h" #include "components/policy/core/browser/configuration_policy_handler.h" class PrefValueMap; diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 03ad285..f6c1a1b 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> +#include <stdint.h> + #include <algorithm> #include <string> #include <vector> @@ -15,6 +18,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" @@ -29,6 +33,7 @@ #include "base/threading/sequenced_worker_pool.h" #include "base/time/time.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/background/background_contents_service.h" #include "chrome/browser/browser_process.h" @@ -193,7 +198,6 @@ #endif #if !defined(OS_MACOSX) -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "chrome/browser/ui/extensions/app_launch_params.h" #include "chrome/browser/ui/extensions/application_launch.h" diff --git a/chrome/browser/policy/policy_helpers.cc b/chrome/browser/policy/policy_helpers.cc index a79640b..81e0150 100644 --- a/chrome/browser/policy/policy_helpers.cc +++ b/chrome/browser/policy/policy_helpers.cc @@ -4,6 +4,7 @@ #include "chrome/browser/policy/policy_helpers.h" +#include "build/build_config.h" #include "net/base/net_errors.h" #include "url/gurl.h" diff --git a/chrome/browser/policy/policy_network_browsertest.cc b/chrome/browser/policy/policy_network_browsertest.cc index ec2d90c..d69178a 100644 --- a/chrome/browser/policy/policy_network_browsertest.cc +++ b/chrome/browser/policy/policy_network_browsertest.cc @@ -4,6 +4,7 @@ #include "base/bind.h" #include "base/command_line.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" #include "chrome/browser/browser_process.h" diff --git a/chrome/browser/policy/policy_path_parser_linux.cc b/chrome/browser/policy/policy_path_parser_linux.cc index e0bed09..6dc2af4 100644 --- a/chrome/browser/policy/policy_path_parser_linux.cc +++ b/chrome/browser/policy/policy_path_parser_linux.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include <pwd.h> +#include <stddef.h> #include <sys/types.h> #include <unistd.h> diff --git a/chrome/browser/policy/policy_path_parser_mac.mm b/chrome/browser/policy/policy_path_parser_mac.mm index 3d834ae..1ac9558 100644 --- a/chrome/browser/policy/policy_path_parser_mac.mm +++ b/chrome/browser/policy/policy_path_parser_mac.mm @@ -4,20 +4,21 @@ #include "chrome/browser/policy/policy_path_parser.h" -#include "base/basictypes.h" -#include "base/files/file_path.h" -#include "base/logging.h" -#import "base/mac/scoped_nsautorelease_pool.h" -#include "base/strings/sys_string_conversions.h" -#include "policy/policy_constants.h" - #import <Cocoa/Cocoa.h> +#include <stddef.h> #import <SystemConfiguration/SCDynamicStore.h> #import <SystemConfiguration/SCDynamicStoreCopySpecific.h> #import <SystemConfiguration/SystemConfiguration.h> #include <string> +#include "base/files/file_path.h" +#include "base/logging.h" +#import "base/mac/scoped_nsautorelease_pool.h" +#include "base/macros.h" +#include "base/strings/sys_string_conversions.h" +#include "policy/policy_constants.h" + namespace policy { namespace path_parser { diff --git a/chrome/browser/policy/policy_path_parser_unittest.cc b/chrome/browser/policy/policy_path_parser_unittest.cc index b6437a4..54eea1a 100644 --- a/chrome/browser/policy/policy_path_parser_unittest.cc +++ b/chrome/browser/policy/policy_path_parser_unittest.cc @@ -2,7 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include "base/files/file_path.h" +#include "build/build_config.h" #include "chrome/browser/policy/policy_path_parser.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/policy/policy_path_parser_win.cc b/chrome/browser/policy/policy_path_parser_win.cc index 2e0c197..d8c62c7 100644 --- a/chrome/browser/policy/policy_path_parser_win.cc +++ b/chrome/browser/policy/policy_path_parser_win.cc @@ -3,11 +3,13 @@ // found in the LICENSE file. #include <shlobj.h> +#include <stddef.h> #include <wtsapi32.h> #pragma comment(lib, "wtsapi32.lib") #include "chrome/browser/policy/policy_path_parser.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/utf_string_conversions.h" #include "base/win/registry.h" diff --git a/chrome/browser/policy/policy_prefs_browsertest.cc b/chrome/browser/policy/policy_prefs_browsertest.cc index 2a0cc03..58ed38d 100644 --- a/chrome/browser/policy/policy_prefs_browsertest.cc +++ b/chrome/browser/policy/policy_prefs_browsertest.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stddef.h> + #include <algorithm> #include <cstdlib> #include <map> @@ -9,11 +11,11 @@ #include <string> #include <vector> -#include "base/basictypes.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/json/json_reader.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" @@ -23,6 +25,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url_service_factory.h" diff --git a/chrome/browser/policy/policy_startup_browsertest.cc b/chrome/browser/policy/policy_startup_browsertest.cc index 85c6cc5..0f4d8e4 100644 --- a/chrome/browser/policy/policy_startup_browsertest.cc +++ b/chrome/browser/policy/policy_startup_browsertest.cc @@ -6,6 +6,7 @@ // PolicyMakeDefaultBrowserTest is not valid for this platform. #include "base/command_line.h" +#include "base/macros.h" #include "chrome/common/chrome_result_codes.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" diff --git a/chrome/browser/policy/profile_policy_connector.cc b/chrome/browser/policy/profile_policy_connector.cc index 945e774..e325634 100644 --- a/chrome/browser/policy/profile_policy_connector.cc +++ b/chrome/browser/policy/profile_policy_connector.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/logging.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "components/policy/core/browser/browser_policy_connector.h" #include "components/policy/core/common/cloud/cloud_policy_core.h" diff --git a/chrome/browser/policy/profile_policy_connector.h b/chrome/browser/policy/profile_policy_connector.h index 8691447..86dedcf 100644 --- a/chrome/browser/policy/profile_policy_connector.h +++ b/chrome/browser/policy/profile_policy_connector.h @@ -8,8 +8,9 @@ #include <string> #include <vector> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" +#include "build/build_config.h" #include "components/keyed_service/core/keyed_service.h" namespace user_manager { diff --git a/chrome/browser/policy/profile_policy_connector_factory.cc b/chrome/browser/policy/profile_policy_connector_factory.cc index 7ee2a6f..3d79592 100644 --- a/chrome/browser/policy/profile_policy_connector_factory.cc +++ b/chrome/browser/policy/profile_policy_connector_factory.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "base/memory/singleton.h" +#include "build/build_config.h" #include "chrome/browser/policy/profile_policy_connector.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/policy/profile_policy_connector_factory.h b/chrome/browser/policy/profile_policy_connector_factory.h index 42ad65a..b7ea5e9 100644 --- a/chrome/browser/policy/profile_policy_connector_factory.h +++ b/chrome/browser/policy/profile_policy_connector_factory.h @@ -8,7 +8,7 @@ #include <list> #include <map> -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/keyed_service/content/browser_context_keyed_base_factory.h" diff --git a/chrome/browser/policy/profile_policy_connector_unittest.cc b/chrome/browser/policy/profile_policy_connector_unittest.cc index 74d578f..07cb990 100644 --- a/chrome/browser/policy/profile_policy_connector_unittest.cc +++ b/chrome/browser/policy/profile_policy_connector_unittest.cc @@ -6,6 +6,7 @@ #include "base/run_loop.h" #include "base/values.h" +#include "build/build_config.h" #include "chrome/test/base/testing_browser_process.h" #include "components/autofill/core/common/autofill_pref_names.h" #include "components/policy/core/browser/browser_policy_connector.h" diff --git a/chrome/browser/policy/schema_registry_service.h b/chrome/browser/policy/schema_registry_service.h index 316ba08..c2acbbf 100644 --- a/chrome/browser/policy/schema_registry_service.h +++ b/chrome/browser/policy/schema_registry_service.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_ #define CHROME_BROWSER_POLICY_SCHEMA_REGISTRY_SERVICE_H_ -#include "base/basictypes.h" +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "components/keyed_service/core/keyed_service.h" diff --git a/chrome/browser/policy/schema_registry_service_factory.cc b/chrome/browser/policy/schema_registry_service_factory.cc index 01b3b4a..31826a9 100644 --- a/chrome/browser/policy/schema_registry_service_factory.cc +++ b/chrome/browser/policy/schema_registry_service_factory.cc @@ -5,6 +5,7 @@ #include "chrome/browser/policy/schema_registry_service_factory.h" #include "base/logging.h" +#include "build/build_config.h" #include "chrome/browser/policy/schema_registry_service.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/policy/core/common/schema.h" diff --git a/chrome/browser/policy/test/local_policy_test_server.cc b/chrome/browser/policy/test/local_policy_test_server.cc index 41838f9..26e1f72 100644 --- a/chrome/browser/policy/test/local_policy_test_server.cc +++ b/chrome/browser/policy/test/local_policy_test_server.cc @@ -5,6 +5,7 @@ #include "chrome/browser/policy/test/local_policy_test_server.h" #include <ctype.h> +#include <stdint.h> #include <algorithm> #include <vector> @@ -14,6 +15,7 @@ #include "base/json/json_writer.h" #include "base/path_service.h" #include "base/strings/stringprintf.h" +#include "build/build_config.h" #include "components/policy/core/common/cloud/cloud_policy_constants.h" #include "crypto/rsa_private_key.h" #include "net/test/python_utils.h" @@ -89,7 +91,7 @@ bool LocalPolicyTestServer::SetSigningKeyAndSignature( const crypto::RSAPrivateKey* key, const std::string& signature) { CHECK(server_data_dir_.IsValid()); - std::vector<uint8> signing_key_bits; + std::vector<uint8_t> signing_key_bits; if (!key->ExportPrivateKey(&signing_key_bits)) return false; diff --git a/chrome/browser/policy/test/local_policy_test_server.h b/chrome/browser/policy/test/local_policy_test_server.h index a8e04aa..de7956f 100644 --- a/chrome/browser/policy/test/local_policy_test_server.h +++ b/chrome/browser/policy/test/local_policy_test_server.h @@ -7,10 +7,10 @@ #include <string> -#include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" +#include "base/macros.h" #include "base/values.h" #include "net/test/spawned_test_server/local_test_server.h" #include "url/gurl.h" |
