summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbinjin <binjin@chromium.org>2014-12-01 05:04:29 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-01 13:04:50 +0000
commit828b1416af6e2975bbe1296c89bd360cd083bba1 (patch)
treeec9eee172ef7a0b069180a4340069fa1781bc22e /chrome
parent098fe0be1d43fa1e81b31f4840e2be24ac83c69d (diff)
downloadchromium_src-828b1416af6e2975bbe1296c89bd360cd083bba1.zip
chromium_src-828b1416af6e2975bbe1296c89bd360cd083bba1.tar.gz
chromium_src-828b1416af6e2975bbe1296c89bd360cd083bba1.tar.bz2
Fix cpplint warnings in **/policy/
This CL fixes most of cpplint warnings excluding "build/include_what_you_use" and "readability/inheritance" BUG=None Review URL: https://codereview.chromium.org/767603002 Cr-Commit-Position: refs/heads/master@{#306181}
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc1
-rw-r--r--chrome/browser/chromeos/policy/cloud_external_data_store_unittest.cc1
-rw-r--r--chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc8
-rw-r--r--chrome/browser/chromeos/policy/device_status_collector_browsertest.cc6
-rw-r--r--chrome/browser/chromeos/policy/login_screen_default_policy_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc12
-rw-r--r--chrome/browser/chromeos/policy/power_policy_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/policy/recommendation_restorer_factory.h2
-rw-r--r--chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h2
-rw-r--r--chrome/browser/chromeos/policy/user_network_configuration_updater_factory.h2
-rw-r--r--chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc2
-rw-r--r--chrome/browser/policy/chrome_browser_policy_connector.h2
-rw-r--r--chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc2
-rw-r--r--chrome/browser/policy/configuration_policy_handler_list_factory.cc2
-rw-r--r--chrome/browser/policy/policy_browsertest.cc2
15 files changed, 26 insertions, 22 deletions
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc b/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc
index fe9d3f9..8ba07da 100644
--- a/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc
+++ b/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc
@@ -138,6 +138,7 @@ class CloudExternalDataManagerBaseTest : public testing::Test {
std::map<int, std::string*> callback_data_;
PolicyDetailsMap policy_details_;
+ private:
DISALLOW_COPY_AND_ASSIGN(CloudExternalDataManagerBaseTest);
};
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_store_unittest.cc b/chrome/browser/chromeos/policy/cloud_external_data_store_unittest.cc
index 4ac05cd1..ca2341a 100644
--- a/chrome/browser/chromeos/policy/cloud_external_data_store_unittest.cc
+++ b/chrome/browser/chromeos/policy/cloud_external_data_store_unittest.cc
@@ -41,6 +41,7 @@ class CouldExternalDataStoreTest : public testing::Test {
base::ScopedTempDir temp_dir_;
scoped_ptr<ResourceCache> resource_cache_;
+ private:
DISALLOW_COPY_AND_ASSIGN(CouldExternalDataStoreTest);
};
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc b/chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc
index dd2b3f6..87ea8be 100644
--- a/chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc
+++ b/chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc
@@ -80,7 +80,7 @@ class DeviceCloudPolicyInvalidatorTest : public testing::Test {
virtual void TearDown() override;
// Ownership is not passed. The Profile is owned by the global ProfileManager.
- Profile *LogInAndReturnProfile(const std::string& user_id);
+ Profile* LogInAndReturnProfile(const std::string& user_id);
invalidation::TiclInvalidationService* GetDeviceInvalidationService();
bool HasDeviceInvalidationServiceObserver() const;
@@ -180,7 +180,7 @@ void DeviceCloudPolicyInvalidatorTest::TearDown() {
chromeos::SystemSaltGetter::Shutdown();
}
-Profile *DeviceCloudPolicyInvalidatorTest::LogInAndReturnProfile(
+Profile* DeviceCloudPolicyInvalidatorTest::LogInAndReturnProfile(
const std::string& user_id) {
fake_user_manager_->AddUser(user_id);
Profile* profile = profile_manager_.CreateTestingProfile(user_id);
@@ -196,8 +196,8 @@ DeviceCloudPolicyInvalidatorTest::GetDeviceInvalidationService() {
return invalidator_->device_invalidation_service_.get();
}
-bool DeviceCloudPolicyInvalidatorTest::HasDeviceInvalidationServiceObserver(
- ) const {
+bool DeviceCloudPolicyInvalidatorTest::HasDeviceInvalidationServiceObserver()
+ const {
return invalidator_->device_invalidation_service_observer_.get();
}
diff --git a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
index d2c5696..68d7072 100644
--- a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
@@ -308,7 +308,7 @@ TEST_F(DeviceStatusCollectorTest, AllActive) {
GetStatus();
EXPECT_EQ(1, status_.active_period_size());
EXPECT_EQ(1 * ActivePeriodMilliseconds(), GetActiveMilliseconds(status_));
- status_.clear_active_period(); // Clear the result protobuf.
+ status_.clear_active_period(); // Clear the result protobuf.
// Test multiple consecutive active samples.
status_collector_->Simulate(test_states,
@@ -659,7 +659,7 @@ struct FakeDeviceData {
const char* mac_address;
const char* meid;
const char* imei;
- int expected_type; // proto enum type value, -1 for not present.
+ int expected_type; // proto enum type value, -1 for not present.
};
static const FakeDeviceData kFakeDevices[] = {
@@ -727,7 +727,7 @@ class DeviceStatusCollectorNetworkInterfacesTest
TEST_F(DeviceStatusCollectorNetworkInterfacesTest, NetworkInterfaces) {
// Interfaces should be reported by default.
GetStatus();
- EXPECT_TRUE(status_.network_interface_size() > 0);
+ EXPECT_LT(0, status_.network_interface_size());
// No interfaces should be reported if the policy is off.
cros_settings_->SetBoolean(chromeos::kReportDeviceNetworkInterfaces, false);
diff --git a/chrome/browser/chromeos/policy/login_screen_default_policy_browsertest.cc b/chrome/browser/chromeos/policy/login_screen_default_policy_browsertest.cc
index 0114da8..c93f0f4 100644
--- a/chrome/browser/chromeos/policy/login_screen_default_policy_browsertest.cc
+++ b/chrome/browser/chromeos/policy/login_screen_default_policy_browsertest.cc
@@ -463,4 +463,4 @@ IN_PROC_BROWSER_TEST_F(LoginScreenDefaultPolicyLoginScreenBrowsertest,
EXPECT_TRUE(accessibility_manager->IsVirtualKeyboardEnabled());
}
-} // namespace policy
+} // namespace policy
diff --git a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
index 0d508ed..18650cd 100644
--- a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
+++ b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
@@ -84,14 +84,14 @@ class FakeWebTrustedCertsObserver
};
class FakeNetworkDeviceHandler : public chromeos::FakeNetworkDeviceHandler {
- public:
- FakeNetworkDeviceHandler() : allow_roaming_(false) {}
+ public:
+ FakeNetworkDeviceHandler() : allow_roaming_(false) {}
- virtual void SetCellularAllowRoaming(bool allow_roaming) override {
- allow_roaming_ = allow_roaming;
- }
+ virtual void SetCellularAllowRoaming(bool allow_roaming) override {
+ allow_roaming_ = allow_roaming;
+ }
- bool allow_roaming_;
+ bool allow_roaming_;
private:
DISALLOW_COPY_AND_ASSIGN(FakeNetworkDeviceHandler);
diff --git a/chrome/browser/chromeos/policy/power_policy_browsertest.cc b/chrome/browser/chromeos/policy/power_policy_browsertest.cc
index 022cd3d..28a8e95 100644
--- a/chrome/browser/chromeos/policy/power_policy_browsertest.cc
+++ b/chrome/browser/chromeos/policy/power_policy_browsertest.cc
@@ -159,6 +159,7 @@ class PowerPolicyLoginScreenBrowserTest : public PowerPolicyBrowserTestBase {
virtual void SetUpOnMainThread() override;
virtual void TearDownOnMainThread() override;
+ private:
DISALLOW_COPY_AND_ASSIGN(PowerPolicyLoginScreenBrowserTest);
};
@@ -169,6 +170,7 @@ class PowerPolicyInSessionBrowserTest : public PowerPolicyBrowserTestBase {
// PowerPolicyBrowserTestBase:
virtual void SetUpOnMainThread() override;
+ private:
DISALLOW_COPY_AND_ASSIGN(PowerPolicyInSessionBrowserTest);
};
diff --git a/chrome/browser/chromeos/policy/recommendation_restorer_factory.h b/chrome/browser/chromeos/policy/recommendation_restorer_factory.h
index e137d0d..c8275c4 100644
--- a/chrome/browser/chromeos/policy/recommendation_restorer_factory.h
+++ b/chrome/browser/chromeos/policy/recommendation_restorer_factory.h
@@ -37,6 +37,6 @@ class RecommendationRestorerFactory : public BrowserContextKeyedServiceFactory {
DISALLOW_COPY_AND_ASSIGN(RecommendationRestorerFactory);
};
-} // namespace policy
+} // namespace policy
#endif // CHROME_BROWSER_CHROMEOS_POLICY_RECOMMENDATION_RESTORER_FACTORY_H_
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h
index 07805d9..642a2b3 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h
@@ -68,7 +68,7 @@ class UserCloudPolicyStoreChromeOS : public UserCloudPolicyStoreBase {
void OnPolicyToStoreValidated(UserCloudPolicyValidator* validator);
// Called back from SessionManagerClient for policy store operations.
- void OnPolicyStored(bool);
+ void OnPolicyStored(bool success);
// Called back from SessionManagerClient for policy load operations.
void OnPolicyRetrieved(const std::string& policy_blob);
diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.h b/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.h
index ab1c2fe..99530b4 100644
--- a/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.h
+++ b/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.h
@@ -18,7 +18,7 @@ namespace policy {
class UserNetworkConfigurationUpdater;
- // Factory to create UserNetworkConfigurationUpdater.
+// Factory to create UserNetworkConfigurationUpdater.
class UserNetworkConfigurationUpdaterFactory
: public BrowserContextKeyedServiceFactory {
public:
diff --git a/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc b/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc
index c8eba3d..ad1cac9 100644
--- a/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc
+++ b/chrome/browser/chromeos/policy/variations_service_policy_browsertest.cc
@@ -51,4 +51,4 @@ IN_PROC_BROWSER_TEST_F(VariationsServiceDevicePolicyTest, VariationsURLValid) {
EXPECT_EQ("restricted", value);
}
-} // namespace policy
+} // namespace policy
diff --git a/chrome/browser/policy/chrome_browser_policy_connector.h b/chrome/browser/policy/chrome_browser_policy_connector.h
index ecca2f6..2d0fdde 100644
--- a/chrome/browser/policy/chrome_browser_policy_connector.h
+++ b/chrome/browser/policy/chrome_browser_policy_connector.h
@@ -44,7 +44,7 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
// enable-web-based-signin policy is enabled.
// TODO(guohui): Needs to move this to a more proper place and also to handle
// dynamic refresh.
- void AppendExtraFlagPerPolicy();
+ void AppendExtraFlagPerPolicy();
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserPolicyConnector);
};
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 8f8627d..c5e7f2ba 100644
--- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
+++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
@@ -97,7 +97,7 @@ class SigninManagerFake : public FakeSigninManager {
UserCloudPolicyManager* BuildCloudPolicyManager(
content::BrowserContext* context) {
- MockUserCloudPolicyStore *store = new MockUserCloudPolicyStore();
+ MockUserCloudPolicyStore* store = new MockUserCloudPolicyStore();
EXPECT_CALL(*store, Load()).Times(AnyNumber());
return new UserCloudPolicyManager(
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index d6e4a3f..71329dd 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -532,7 +532,7 @@ void GetDeprecatedFeaturesMap(
ScopedVector<StringMappingListPolicyHandler::MappingEntry>* result) {
// Maps feature tags as specified in policy to the corresponding switch to
// re-enable them.
- // TODO: Remove after 2015-04-30 per http://crbug.com/374782.
+ // TODO(atwilson): Remove after 2015-04-30 per http://crbug.com/374782.
result->push_back(new StringMappingListPolicyHandler::MappingEntry(
"ShowModalDialog_EffectiveUntil20150430",
scoped_ptr<base::Value>(new base::StringValue(
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 939d360..6f61f15 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1459,7 +1459,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DeveloperToolsDisabled) {
EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_DEV_TOOLS));
content::WebContents* contents =
browser()->tab_strip_model()->GetActiveWebContents();
- DevToolsWindow *devtools_window =
+ DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(contents);
EXPECT_TRUE(devtools_window);