Change namespace to ash for //c/b/ash/child_accounts/* files
Code in //chrome/browser/ash/child_accounts/* files is a part
of the ash-chrome, so namespace is changed to ash from chromeos.
To avoid churn during other namespace transitions in future, this CL has
temporary 'using' declarations.
This CL is part of the Chrome OS source code directory migration:
https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE.
Change-Id: I54271c7675525683fb7caa026437104640dc9662
Bug: 1164001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2843103
Commit-Queue: Yeunjoo Choi <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Owners-Override: Hidehiko Abe <[email protected]>
Cr-Commit-Position: refs/heads/master@{#876113}
diff --git a/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller.cc b/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller.cc
index 1216218..bc4bc112 100644
--- a/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller.cc
+++ b/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller.cc
@@ -20,8 +20,6 @@
namespace ash {
-namespace edu_coexistence = ::chromeos::edu_coexistence;
-
void EduCoexistenceConsentInvalidationController::RegisterProfilePrefs(
PrefRegistrySimple* registry) {
// |kEduCoexistenceToSVersion| is derived from Google3 CL that introduced
diff --git a/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller_unittest.cc b/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller_unittest.cc
index 767ca39..3587c64 100644
--- a/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller_unittest.cc
+++ b/chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller_unittest.cc
@@ -33,8 +33,6 @@
namespace {
-namespace edu_coexistence = ::chromeos::edu_coexistence;
-
constexpr char kValidToken[] = "valid-token";
constexpr char kPrimaryAccount[] = "[email protected]";
diff --git a/chrome/browser/ash/child_accounts/child_account_test_utils.cc b/chrome/browser/ash/child_accounts/child_account_test_utils.cc
index f6edd562e..77699315 100644
--- a/chrome/browser/ash/child_accounts/child_account_test_utils.cc
+++ b/chrome/browser/ash/child_accounts/child_account_test_utils.cc
@@ -7,7 +7,7 @@
#include "base/base64.h"
#include "base/strings/stringprintf.h"
-namespace chromeos {
+namespace ash {
namespace test {
std::string GetChildAccountOAuthIdToken() {
@@ -17,4 +17,4 @@
}
} // namespace test
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/child_account_test_utils.h b/chrome/browser/ash/child_accounts/child_account_test_utils.h
index fd79a8d3..797efb4a 100644
--- a/chrome/browser/ash/child_accounts/child_account_test_utils.h
+++ b/chrome/browser/ash/child_accounts/child_account_test_utils.h
@@ -7,13 +7,20 @@
#include <string>
-namespace chromeos {
+namespace ash {
namespace test {
// Returns a base64-encoded dummy token for child log-in.
std::string GetChildAccountOAuthIdToken();
} // namespace test
+} // namespace ash
+
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+namespace test {
+using ::ash::test::GetChildAccountOAuthIdToken;
+} // namespace test
} // namespace chromeos
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_CHILD_ACCOUNT_TEST_UTILS_H_
diff --git a/chrome/browser/ash/child_accounts/child_policy_observer.cc b/chrome/browser/ash/child_accounts/child_policy_observer.cc
index 4c27a775..e9a2266 100644
--- a/chrome/browser/ash/child_accounts/child_policy_observer.cc
+++ b/chrome/browser/ash/child_accounts/child_policy_observer.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/profiles/profile.h"
#include "components/policy/core/common/cloud/cloud_policy_core.h"
-namespace chromeos {
+namespace ash {
ChildPolicyObserver::ChildPolicyObserver(Profile* profile) : profile_(profile) {
policy::CloudPolicyService* cloud_policy_service =
@@ -80,4 +80,4 @@
return user_cloud_policy_manager;
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/child_policy_observer.h b/chrome/browser/ash/child_accounts/child_policy_observer.h
index 51de234..010fc98 100644
--- a/chrome/browser/ash/child_accounts/child_policy_observer.h
+++ b/chrome/browser/ash/child_accounts/child_policy_observer.h
@@ -17,13 +17,13 @@
namespace base {
class OneShotTimer;
-}
+} // namespace base
namespace policy {
class UserCloudPolicyManagerChromeOS;
-}
+} // namespace policy
-namespace chromeos {
+namespace ash {
// Observes initial policy refresh for child user.
// Unlike for regular user, child user policy is refreshed after profile
@@ -91,6 +91,11 @@
DISALLOW_COPY_AND_ASSIGN(ChildPolicyObserver);
};
+} // namespace ash
+
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+using ::ash::ChildPolicyObserver;
} // namespace chromeos
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_CHILD_POLICY_OBSERVER_H_
diff --git a/chrome/browser/ash/child_accounts/child_status_reporting_service.cc b/chrome/browser/ash/child_accounts/child_status_reporting_service.cc
index 9fb415d..0c6382e 100644
--- a/chrome/browser/ash/child_accounts/child_status_reporting_service.cc
+++ b/chrome/browser/ash/child_accounts/child_status_reporting_service.cc
@@ -22,7 +22,7 @@
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -87,7 +87,7 @@
std::make_unique<policy::ChildStatusCollector>(
pref_change_registrar_->prefs(),
Profile::FromBrowserContext(context_),
- system::StatisticsProvider::GetInstance(),
+ chromeos::system::StatisticsProvider::GetInstance(),
policy::ChildStatusCollector::AndroidStatusFetcher(),
day_reset_time_),
base::ThreadTaskRunnerHandle::Get(), kStatusUploadFrequency);
@@ -109,4 +109,4 @@
CreateStatusUploaderIfNeeded(user_cloud_policy_manager_->core()->client());
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/child_status_reporting_service.h b/chrome/browser/ash/child_accounts/child_status_reporting_service.h
index 5b76d42f..4d72878 100644
--- a/chrome/browser/ash/child_accounts/child_status_reporting_service.h
+++ b/chrome/browser/ash/child_accounts/child_status_reporting_service.h
@@ -14,7 +14,7 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
namespace policy {
class CloudPolicyClient;
@@ -22,7 +22,7 @@
class UserCloudPolicyManagerChromeOS;
} // namespace policy
-namespace chromeos {
+namespace ash {
// Controls reporting for child user.
// Child user should be registered with DMServer and periodically upload the
@@ -67,6 +67,6 @@
policy::UserCloudPolicyManagerChromeOS* user_cloud_policy_manager_;
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_CHILD_STATUS_REPORTING_SERVICE_H_
diff --git a/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.cc b/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.cc
index 1354527..638c82a 100644
--- a/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.cc
+++ b/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/ash/child_accounts/child_status_reporting_service.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
-namespace chromeos {
+namespace ash {
// static
ChildStatusReportingService*
@@ -38,4 +38,4 @@
return new ChildStatusReportingService(context);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.h b/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.h
index bb14a19..c78e40101 100644
--- a/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.h
+++ b/chrome/browser/ash/child_accounts/child_status_reporting_service_factory.h
@@ -10,9 +10,9 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
class ChildStatusReportingService;
// Singleton that owns all ChildStatusReportingService objects and associates
@@ -43,6 +43,11 @@
content::BrowserContext* context) const override;
};
+} // namespace ash
+
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+using ::ash::ChildStatusReportingServiceFactory;
} // namespace chromeos
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_CHILD_STATUS_REPORTING_SERVICE_FACTORY_H_
diff --git a/chrome/browser/ash/child_accounts/child_user_service.cc b/chrome/browser/ash/child_accounts/child_user_service.cc
index b964c3d..8554296 100644
--- a/chrome/browser/ash/child_accounts/child_user_service.cc
+++ b/chrome/browser/ash/child_accounts/child_user_service.cc
@@ -14,7 +14,7 @@
#include "extensions/common/constants.h"
#include "url/gurl.h"
-namespace chromeos {
+namespace ash {
// static
const char ChildUserService::kFamilyLinkHelperAppPackageName[] =
@@ -157,4 +157,4 @@
}
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/child_user_service.h b/chrome/browser/ash/child_accounts/child_user_service.h
index 2a817212..d4709a17 100644
--- a/chrome/browser/ash/child_accounts/child_user_service.h
+++ b/chrome/browser/ash/child_accounts/child_user_service.h
@@ -11,13 +11,7 @@
#include "chrome/browser/ash/child_accounts/family_user_parental_control_metrics.h"
#include "chrome/browser/ash/child_accounts/time_limits/app_activity_report_interface.h"
-// TODO(https://crbug.com/1164001): forward declare when moved ash
-#include "chrome/browser/ash/child_accounts/time_limits/app_time_controller.h"
#include "chrome/browser/ash/child_accounts/time_limits/app_time_limit_interface.h"
-// TODO(https://crbug.com/1164001): forward declare when moved ash
-#include "chrome/browser/ash/child_accounts/time_limits/app_types.h"
-// TODO(https://crbug.com/1164001): forward declare when moved ash
-#include "chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer.h"
#include "components/keyed_service/core/keyed_service.h"
namespace base {
@@ -34,7 +28,12 @@
class GURL;
-namespace chromeos {
+namespace ash {
+namespace app_time {
+class AppId;
+class AppTimeController;
+class WebTimeLimitEnforcer;
+} // namespace app_time
// Facade that exposes child user related functionality on Chrome OS.
// TODO(crbug.com/1022231): Migrate ConsumerStatusReportingService,
@@ -110,12 +109,11 @@
std::unique_ptr<app_time::AppTimeController> app_time_controller_;
};
-} // namespace chromeos
-
-// TODO(https://crbug.com/1164001): remove when //c/b/ash/child_accounts moved
-// to ash.
-namespace ash {
-using ::chromeos::ChildUserService;
} // namespace ash
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+using ::ash::ChildUserService;
+} // namespace chromeos
+
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_CHILD_USER_SERVICE_H_
diff --git a/chrome/browser/ash/child_accounts/child_user_service_factory.cc b/chrome/browser/ash/child_accounts/child_user_service_factory.cc
index 72e8e42..c23098e 100644
--- a/chrome/browser/ash/child_accounts/child_user_service_factory.cc
+++ b/chrome/browser/ash/child_accounts/child_user_service_factory.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/ash/child_accounts/child_user_service.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
-namespace chromeos {
+namespace ash {
// static
ChildUserService* ChildUserServiceFactory::GetForBrowserContext(
@@ -37,4 +37,4 @@
return new ChildUserService(context);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/child_user_service_factory.h b/chrome/browser/ash/child_accounts/child_user_service_factory.h
index 732fdd89..f21bb695 100644
--- a/chrome/browser/ash/child_accounts/child_user_service_factory.h
+++ b/chrome/browser/ash/child_accounts/child_user_service_factory.h
@@ -6,15 +6,14 @@
#define CHROME_BROWSER_ASH_CHILD_ACCOUNTS_CHILD_USER_SERVICE_FACTORY_H_
#include "base/no_destructor.h"
-// TODO(https://crbug.com/1164001): forward declare when moved ash
-#include "chrome/browser/ash/child_accounts/child_user_service.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
+class ChildUserService;
// Singleton that owns all ChildUserService objects and associates them with
// BrowserContexts. Listens for the BrowserContext's destruction notification
@@ -39,12 +38,11 @@
content::BrowserContext* context) const override;
};
-} // namespace chromeos
-
-// TODO(https://crbug.com/1164001): remove when //c/b/ash/child_accounts moved
-// to ash.
-namespace ash {
-using ::chromeos::ChildUserServiceFactory;
} // namespace ash
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+using ::ash::ChildUserServiceFactory;
+} // namespace chromeos
+
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_CHILD_USER_SERVICE_FACTORY_H_
diff --git a/chrome/browser/ash/child_accounts/child_user_service_unittest.cc b/chrome/browser/ash/child_accounts/child_user_service_unittest.cc
index 11f00ae..c5f125f 100644
--- a/chrome/browser/ash/child_accounts/child_user_service_unittest.cc
+++ b/chrome/browser/ash/child_accounts/child_user_service_unittest.cc
@@ -22,7 +22,7 @@
#include "extensions/common/constants.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
class ChildUserServiceTest : public testing::Test {
protected:
@@ -142,4 +142,4 @@
EXPECT_TRUE(service()->WebTimeLimitReached());
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.cc b/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.cc
index 04382db..05aa2c37 100644
--- a/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.cc
+++ b/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.cc
@@ -12,7 +12,7 @@
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
-namespace chromeos {
+namespace ash {
namespace edu_coexistence {
@@ -43,8 +43,8 @@
void UpdateAcceptedToSVersionPref(Profile* profile,
const UserConsentInfo& user_consent_info) {
- DictionaryPrefUpdate update(
- profile->GetPrefs(), chromeos::prefs::kEduCoexistenceToSAcceptedVersion);
+ DictionaryPrefUpdate update(profile->GetPrefs(),
+ prefs::kEduCoexistenceToSAcceptedVersion);
base::DictionaryValue* dict = update.Get();
dict->SetStringPath(user_consent_info.edu_account_gaia_id,
@@ -60,14 +60,14 @@
info.edu_account_gaia_id, info.edu_coexistence_tos_version);
}
- profile->GetPrefs()->Set(chromeos::prefs::kEduCoexistenceToSAcceptedVersion,
+ profile->GetPrefs()->Set(prefs::kEduCoexistenceToSAcceptedVersion,
std::move(user_consent_info_list_value));
}
std::vector<UserConsentInfo> GetUserConsentInfoListForProfile(
Profile* profile) {
- const base::Value* user_consent_info_dict_value = profile->GetPrefs()->Get(
- chromeos::prefs::kEduCoexistenceToSAcceptedVersion);
+ const base::Value* user_consent_info_dict_value =
+ profile->GetPrefs()->Get(prefs::kEduCoexistenceToSAcceptedVersion);
DCHECK(user_consent_info_dict_value);
DCHECK(user_consent_info_dict_value->is_dict());
@@ -85,8 +85,8 @@
std::string GetAcceptedToSVersion(Profile* profile,
const std::string& secondary_edu_gaia_id) {
- const base::Value* accepted_values = profile->GetPrefs()->Get(
- chromeos::prefs::kEduCoexistenceToSAcceptedVersion);
+ const base::Value* accepted_values =
+ profile->GetPrefs()->Get(prefs::kEduCoexistenceToSAcceptedVersion);
const std::string* entry =
accepted_values->FindStringKey(secondary_edu_gaia_id);
@@ -94,4 +94,4 @@
}
} // namespace edu_coexistence
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.h b/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.h
index c95bc5c7..040c3ac2 100644
--- a/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.h
+++ b/chrome/browser/ash/child_accounts/edu_coexistence_tos_store_utils.h
@@ -10,11 +10,11 @@
class Profile;
-namespace chromeos {
+namespace ash {
namespace edu_coexistence {
// The first google3 cl number that is sent through a policy which is mapped
-// to |chromeos::prefs::kEduCoexistenceToSVersion|. All version numbers sent
+// to |ash::prefs::kEduCoexistenceToSVersion|. All version numbers sent
// will be greater than or equal to |kMinTOSVersionNumber|.
extern const char kMinTOSVersionNumber[];
@@ -38,7 +38,7 @@
// If the account already exists in user's pref, then its accepted tos will be
// updated. Otherwise, a new entry will be created.
// The pref that is used to store the UserConsentInfo is defined in:
-// |chromeos::prefs::kEduCoexistenceToSAcceptedVersion|
+// |ash::prefs::kEduCoexistenceToSAcceptedVersion|
// Unlike |SetUserConsentInfoListForProfile| this doesn't overwrite the entire
// stored UserConsentInfo list; it instead updates it.
void UpdateAcceptedToSVersionPref(Profile* profile,
@@ -50,13 +50,14 @@
const std::vector<UserConsentInfo>& user_consent_info_list);
// Returns the list of UserConsentInfo stored in
-// |chromeos::prefs::kEduCoexistenceToSAcceptedVersion|.
+// |ash::prefs::kEduCoexistenceToSAcceptedVersion|.
std::vector<UserConsentInfo> GetUserConsentInfoListForProfile(Profile* profile);
// |profile| is the Primary user profile which is the family link user.
std::string GetAcceptedToSVersion(Profile* profile,
const std::string& secondary_edu_gaia_id);
+
} // namespace edu_coexistence
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_EDU_COEXISTENCE_TOS_STORE_UTILS_H_
diff --git a/chrome/browser/ash/child_accounts/event_based_status_reporting_service.cc b/chrome/browser/ash/child_accounts/event_based_status_reporting_service.cc
index 13a9f1fe..981f965 100644
--- a/chrome/browser/ash/child_accounts/event_based_status_reporting_service.cc
+++ b/chrome/browser/ash/child_accounts/event_based_status_reporting_service.cc
@@ -14,7 +14,7 @@
#include "components/session_manager/core/session_manager.h"
#include "content/public/browser/network_service_instance.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -133,4 +133,4 @@
this);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/event_based_status_reporting_service.h b/chrome/browser/ash/child_accounts/event_based_status_reporting_service.h
index 0e17fea0..b4a610b49 100644
--- a/chrome/browser/ash/child_accounts/event_based_status_reporting_service.h
+++ b/chrome/browser/ash/child_accounts/event_based_status_reporting_service.h
@@ -16,9 +16,9 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
// Requests status report when events relevant to supervision features happen.
// The events that are triggers to status report are:
@@ -91,6 +91,6 @@
DISALLOW_COPY_AND_ASSIGN(EventBasedStatusReportingService);
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_EVENT_BASED_STATUS_REPORTING_SERVICE_H_
diff --git a/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.cc b/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.cc
index dd95493e..c2c4c4a 100644
--- a/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.cc
+++ b/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
-namespace chromeos {
+namespace ash {
// static
EventBasedStatusReportingService*
@@ -45,4 +45,4 @@
return new EventBasedStatusReportingService(context);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.h b/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.h
index 1f67938..898c4a4 100644
--- a/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.h
+++ b/chrome/browser/ash/child_accounts/event_based_status_reporting_service_factory.h
@@ -11,9 +11,9 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
class EventBasedStatusReportingService;
// Singleton that owns all EventBasedStatusReportingService and associates
@@ -40,6 +40,6 @@
DISALLOW_COPY_AND_ASSIGN(EventBasedStatusReportingServiceFactory);
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_EVENT_BASED_STATUS_REPORTING_SERVICE_FACTORY_H_
diff --git a/chrome/browser/ash/child_accounts/event_based_status_reporting_service_unittest.cc b/chrome/browser/ash/child_accounts/event_based_status_reporting_service_unittest.cc
index 6c81ed4..4e7a2fa 100644
--- a/chrome/browser/ash/child_accounts/event_based_status_reporting_service_unittest.cc
+++ b/chrome/browser/ash/child_accounts/event_based_status_reporting_service_unittest.cc
@@ -28,7 +28,7 @@
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -96,7 +96,7 @@
session_manager_.CreateSession(
account_id(),
- chromeos::ProfileHelper::GetUserIdHashByUserIdForTesting(
+ ProfileHelper::GetUserIdHashByUserIdForTesting(
account_id().GetUserEmail()),
true);
session_manager_.SetSessionState(
@@ -155,9 +155,7 @@
}
AccountId account_id() {
- return chromeos::ProfileHelper::Get()
- ->GetUserByProfile(profile())
- ->GetAccountId();
+ return ProfileHelper::Get()->GetUserByProfile(profile())->GetAccountId();
}
base::HistogramTester histogram_tester_;
@@ -357,4 +355,4 @@
EventBasedStatusReportingService::kUMAStatusReportEvent, 7);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_features.cc b/chrome/browser/ash/child_accounts/family_features.cc
index a406cff..08946868 100644
--- a/chrome/browser/ash/child_accounts/family_features.cc
+++ b/chrome/browser/ash/child_accounts/family_features.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/ash/child_accounts/family_features.h"
-namespace chromeos {
+namespace ash {
const base::Feature kFamilyUserMetricsProvider{
"FamilyUserMetricsProvider", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -19,4 +19,4 @@
return base::FeatureList::IsEnabled(kFamilyLinkOobeHandoff);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_features.h b/chrome/browser/ash/child_accounts/family_features.h
index 9caedeec..8f30cb8 100644
--- a/chrome/browser/ash/child_accounts/family_features.h
+++ b/chrome/browser/ash/child_accounts/family_features.h
@@ -7,7 +7,7 @@
#include "base/feature_list.h"
-namespace chromeos {
+namespace ash {
// Filters family user metrics into one of four types of family users.
// TODO(crbug/1103077): If any of the buckets end up being too small, disable
@@ -22,6 +22,12 @@
bool IsFamilyLinkOobeHandoffEnabled();
+} // namespace ash
+
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+using ::ash::IsFamilyLinkOobeHandoffEnabled;
+using ::ash::kFamilyLinkOobeHandoff;
} // namespace chromeos
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_FEATURES_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_app_metrics.cc b/chrome/browser/ash/child_accounts/family_user_app_metrics.cc
index 7411f88d..6eb8b31 100644
--- a/chrome/browser/ash/child_accounts/family_user_app_metrics.cc
+++ b/chrome/browser/ash/child_accounts/family_user_app_metrics.cc
@@ -20,7 +20,7 @@
#include "extensions/common/extension_set.h"
#include "extensions/common/manifest.h"
-namespace chromeos {
+namespace ash {
namespace {
// Recently launched apps this many days ago in the past will be recorded.
@@ -213,4 +213,4 @@
return !instance_registry_->GetWindows(app_id).empty();
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_app_metrics.h b/chrome/browser/ash/child_accounts/family_user_app_metrics.h
index cf907d9..9d28fe8 100644
--- a/chrome/browser/ash/child_accounts/family_user_app_metrics.h
+++ b/chrome/browser/ash/child_accounts/family_user_app_metrics.h
@@ -22,7 +22,7 @@
class InstanceRegistry;
} // namespace apps
-namespace chromeos {
+namespace ash {
class FamilyUserAppMetrics : public FamilyUserMetricsService::Observer,
public apps::AppRegistryCache::Observer {
@@ -80,6 +80,6 @@
bool first_report_on_current_device_ = false;
std::set<apps::mojom::AppType> ready_app_types_;
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_USER_APP_METRICS_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_app_metrics_unittest.cc b/chrome/browser/ash/child_accounts/family_user_app_metrics_unittest.cc
index 24680b6..840ead15 100644
--- a/chrome/browser/ash/child_accounts/family_user_app_metrics_unittest.cc
+++ b/chrome/browser/ash/child_accounts/family_user_app_metrics_unittest.cc
@@ -29,7 +29,7 @@
#include "ui/aura/window.h"
#include "ui/compositor/layer_type.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -362,4 +362,4 @@
FamilyUserAppMetricsTest,
/*IsFamilyLink=*/testing::Bool());
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.cc b/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.cc
index 4b923d7..a46672e 100644
--- a/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.cc
+++ b/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.cc
@@ -15,7 +15,7 @@
#include "components/prefs/pref_service.h"
#include "ui/aura/window.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -114,4 +114,4 @@
}
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.h b/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.h
index 7ba88de3..c86b154d 100644
--- a/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.h
+++ b/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.h
@@ -17,9 +17,9 @@
namespace aura {
class Window;
-}
+} // namespace aura
-namespace chromeos {
+namespace ash {
// This class records: FamilyUser.ChromeBrowserEngagement.Duration. It is the
// daily sum of user's active Chrome browser time in milliseconds. Recorded at
// the beginning of the first active Chrome OS session on a subsequent day.
@@ -68,6 +68,6 @@
// might remove that window from the set.
std::set<aura::Window*> active_browser_windows_;
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_USER_CHROME_ACTIVITY_METRICS_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics_unittest.cc b/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics_unittest.cc
index 78ca81c8..3823413 100644
--- a/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics_unittest.cc
+++ b/chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics_unittest.cc
@@ -26,7 +26,7 @@
#include "components/services/app_service/public/cpp/app_registry_cache.h"
#include "components/services/app_service/public/mojom/types.mojom.h"
-namespace chromeos {
+namespace ash {
namespace {
constexpr char kExtensionNameChrome[] = "Chrome";
@@ -276,4 +276,4 @@
prefs::kFamilyUserMetricsChromeBrowserEngagementDuration));
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_device_metrics.cc b/chrome/browser/ash/child_accounts/family_user_device_metrics.cc
index 2195768..e1ad9ee 100644
--- a/chrome/browser/ash/child_accounts/family_user_device_metrics.cc
+++ b/chrome/browser/ash/child_accounts/family_user_device_metrics.cc
@@ -17,7 +17,7 @@
#include "components/user_manager/user_manager.h"
#include "components/user_manager/user_type.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -133,4 +133,4 @@
owner_email == active_user->GetAccountId().GetUserEmail());
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_device_metrics.h b/chrome/browser/ash/child_accounts/family_user_device_metrics.h
index 1661fc4..027e33e 100644
--- a/chrome/browser/ash/child_accounts/family_user_device_metrics.h
+++ b/chrome/browser/ash/child_accounts/family_user_device_metrics.h
@@ -12,9 +12,9 @@
namespace user_manager {
class UserManager;
-}
+} // namespace user_manager
-namespace chromeos {
+namespace ash {
// A class for recording device metrics:
// - FamilyUser.NewUserAdded: Report NewUserAdded enum when a new user is added
// to the Chrome OS device. Recorded when user session starts.
@@ -67,6 +67,6 @@
base::WeakPtrFactory<FamilyUserDeviceMetrics> weak_factory_{this};
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_USER_DEVICE_METRICS_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_device_metrics_browsertest.cc b/chrome/browser/ash/child_accounts/family_user_device_metrics_browsertest.cc
index 6c7123f..0b5157f 100644
--- a/chrome/browser/ash/child_accounts/family_user_device_metrics_browsertest.cc
+++ b/chrome/browser/ash/child_accounts/family_user_device_metrics_browsertest.cc
@@ -21,7 +21,7 @@
#include "components/user_manager/user_type.h"
#include "content/public/test/browser_test.h"
-namespace chromeos {
+namespace ash {
namespace {
const AccountId kDefaultOwnerAccountId =
@@ -361,4 +361,4 @@
LoggedInUserMixin::LogInType::kRegular),
/*IsUserExisting=*/testing::Values(false)));
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_metrics_service.cc b/chrome/browser/ash/child_accounts/family_user_metrics_service.cc
index 56ff5886..52030793 100644
--- a/chrome/browser/ash/child_accounts/family_user_metrics_service.cc
+++ b/chrome/browser/ash/child_accounts/family_user_metrics_service.cc
@@ -17,7 +17,7 @@
#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_context.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -98,4 +98,4 @@
}
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_metrics_service.h b/chrome/browser/ash/child_accounts/family_user_metrics_service.h
index 0896336e..823f147 100644
--- a/chrome/browser/ash/child_accounts/family_user_metrics_service.h
+++ b/chrome/browser/ash/child_accounts/family_user_metrics_service.h
@@ -22,9 +22,9 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
// Service to initialize and control metric recorders of family users on Chrome
// OS.
@@ -67,6 +67,6 @@
std::vector<std::unique_ptr<Observer>> family_user_metrics_;
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_USER_METRICS_SERVICE_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.cc b/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.cc
index f5030e1..e3fe1dc 100644
--- a/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.cc
+++ b/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.cc
@@ -11,7 +11,7 @@
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_context.h"
-namespace chromeos {
+namespace ash {
// static
FamilyUserMetricsService* FamilyUserMetricsServiceFactory::GetForBrowserContext(
@@ -43,4 +43,4 @@
return new FamilyUserMetricsService(context);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.h b/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.h
index 2408f3f..a879ac9 100644
--- a/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.h
+++ b/chrome/browser/ash/child_accounts/family_user_metrics_service_factory.h
@@ -10,9 +10,9 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
class FamilyUserMetricsService;
// Singleton that owns FamilyUserMetricsService object and associates
@@ -43,6 +43,11 @@
content::BrowserContext* context) const override;
};
+} // namespace ash
+
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+using ::ash::FamilyUserMetricsServiceFactory;
} // namespace chromeos
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_USER_METRICS_SERVICE_FACTORY_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_metrics_service_unittest.cc b/chrome/browser/ash/child_accounts/family_user_metrics_service_unittest.cc
index 0856fc3..d8a37dda 100644
--- a/chrome/browser/ash/child_accounts/family_user_metrics_service_unittest.cc
+++ b/chrome/browser/ash/child_accounts/family_user_metrics_service_unittest.cc
@@ -18,7 +18,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -126,4 +126,4 @@
GetDayIdPref());
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.cc b/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.cc
index 421ffc1..e4b8c67 100644
--- a/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.cc
+++ b/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.cc
@@ -19,7 +19,8 @@
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/user_manager/user_manager.h"
-namespace chromeos {
+
+namespace ash {
namespace {
@@ -129,4 +130,4 @@
}
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.h b/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.h
index 0ebbb54b2..fb760334 100644
--- a/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.h
+++ b/chrome/browser/ash/child_accounts/family_user_parental_control_metrics.h
@@ -9,7 +9,7 @@
class Profile;
-namespace chromeos {
+namespace ash {
// A class for recording time limit metrics and web filter metrics for Family
// Link users on Chrome OS. These metrics will be recorded at the beginning of
@@ -60,6 +60,6 @@
Profile* const profile_;
bool first_report_on_current_device_ = false;
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_USER_PARENTAL_CONTROL_METRICS_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_parental_control_metrics_unittest.cc b/chrome/browser/ash/child_accounts/family_user_parental_control_metrics_unittest.cc
index 59f2f18..cf14763 100644
--- a/chrome/browser/ash/child_accounts/family_user_parental_control_metrics_unittest.cc
+++ b/chrome/browser/ash/child_accounts/family_user_parental_control_metrics_unittest.cc
@@ -42,7 +42,7 @@
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -399,4 +399,4 @@
/*expected_count=*/4);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_session_metrics.cc b/chrome/browser/ash/child_accounts/family_user_session_metrics.cc
index 227ec26..85f42370 100644
--- a/chrome/browser/ash/child_accounts/family_user_session_metrics.cc
+++ b/chrome/browser/ash/child_accounts/family_user_session_metrics.cc
@@ -14,7 +14,7 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -154,4 +154,4 @@
}
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/family_user_session_metrics.h b/chrome/browser/ash/child_accounts/family_user_session_metrics.h
index 80528b0..a1768ee6 100644
--- a/chrome/browser/ash/child_accounts/family_user_session_metrics.h
+++ b/chrome/browser/ash/child_accounts/family_user_session_metrics.h
@@ -12,7 +12,7 @@
class PrefRegistrySimple;
class PrefService;
-namespace chromeos {
+namespace ash {
// A class for recording session metrics. Calculates and reports the
// following metrics:
@@ -64,6 +64,6 @@
// when the user becomes inactive.
base::Time active_session_start_;
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_FAMILY_USER_SESSION_METRICS_H_
diff --git a/chrome/browser/ash/child_accounts/family_user_session_metrics_unittest.cc b/chrome/browser/ash/child_accounts/family_user_session_metrics_unittest.cc
index dce9494..f7ae035 100644
--- a/chrome/browser/ash/child_accounts/family_user_session_metrics_unittest.cc
+++ b/chrome/browser/ash/child_accounts/family_user_session_metrics_unittest.cc
@@ -20,7 +20,7 @@
#include "components/session_manager/session_manager_types.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -399,4 +399,4 @@
prefs::kFamilyUserMetricsSessionEngagementDuration));
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/screen_time_controller.cc b/chrome/browser/ash/child_accounts/screen_time_controller.cc
index a990fdd..e2c913b 100644
--- a/chrome/browser/ash/child_accounts/screen_time_controller.cc
+++ b/chrome/browser/ash/child_accounts/screen_time_controller.cc
@@ -29,7 +29,7 @@
#include "components/session_manager/core/session_manager.h"
#include "content/public/browser/browser_context.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -243,7 +243,7 @@
ash::ParentCodeValidationResult result,
base::Optional<AccountId> account_id) {
AccountId current_user_id =
- chromeos::ProfileHelper::Get()
+ ProfileHelper::Get()
->GetUserByProfile(Profile::FromBrowserContext(context_))
->GetAccountId();
if (result != ash::ParentCodeValidationResult::kValid || !account_id ||
@@ -273,7 +273,7 @@
// Show lock message.
AccountId account_id =
- chromeos::ProfileHelper::Get()
+ ProfileHelper::Get()
->GetUserByProfile(Profile::FromBrowserContext(context_))
->GetAccountId();
ScreenLocker::default_screen_locker()->TemporarilyDisableAuthForUser(
@@ -292,7 +292,7 @@
return;
AccountId account_id =
- chromeos::ProfileHelper::Get()
+ ProfileHelper::Get()
->GetUserByProfile(Profile::FromBrowserContext(context_))
->GetAccountId();
ScreenLocker::default_screen_locker()->ReenableAuthForUser(account_id);
@@ -523,4 +523,4 @@
CheckTimeLimit("SystemClockUpdated");
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/screen_time_controller.h b/chrome/browser/ash/child_accounts/screen_time_controller.h
index e7409ad..55644e9 100644
--- a/chrome/browser/ash/child_accounts/screen_time_controller.h
+++ b/chrome/browser/ash/child_accounts/screen_time_controller.h
@@ -25,10 +25,6 @@
class PrefRegistrySimple;
class PrefService;
-namespace ash {
-enum class ParentCodeValidationResult;
-} // namespace ash
-
namespace base {
class Clock;
class TickClock;
@@ -38,9 +34,10 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
+enum class ParentCodeValidationResult;
// The controller to track each user's screen time usage and inquiry time limit
// processor (a component to calculate state based on policy settings and time
@@ -132,7 +129,7 @@
usage_time_limit::PolicyType policy_type);
// parent_access::ParentAccessService::Observer:
- void OnAccessCodeValidation(ash::ParentCodeValidationResult result,
+ void OnAccessCodeValidation(ParentCodeValidationResult result,
base::Optional<AccountId> account_id) override;
// session_manager::SessionManagerObserver:
@@ -178,6 +175,6 @@
DISALLOW_COPY_AND_ASSIGN(ScreenTimeController);
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_SCREEN_TIME_CONTROLLER_H_
diff --git a/chrome/browser/ash/child_accounts/screen_time_controller_browsertest.cc b/chrome/browser/ash/child_accounts/screen_time_controller_browsertest.cc
index 0d9d3a5..b4c16aa9 100644
--- a/chrome/browser/ash/child_accounts/screen_time_controller_browsertest.cc
+++ b/chrome/browser/ash/child_accounts/screen_time_controller_browsertest.cc
@@ -31,7 +31,7 @@
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -138,14 +138,13 @@
Profile* child_profile_ = nullptr;
private:
- chromeos::LoggedInUserMixin logged_in_user_mixin_{
- &mixin_host_,
- LoggedInUserMixin::LogInType::kChild,
- embedded_test_server(),
- this,
- true /*should_launch_browser*/,
- base::nullopt /*account_id*/,
- false /*include_initial_user*/};
+ LoggedInUserMixin logged_in_user_mixin_{&mixin_host_,
+ LoggedInUserMixin::LogInType::kChild,
+ embedded_test_server(),
+ this,
+ true /*should_launch_browser*/,
+ base::nullopt /*account_id*/,
+ false /*include_initial_user*/};
DISALLOW_COPY_AND_ASSIGN(ScreenTimeControllerTest);
};
@@ -788,4 +787,4 @@
->RemoveObserver(&observer);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/screen_time_controller_factory.cc b/chrome/browser/ash/child_accounts/screen_time_controller_factory.cc
index 5bb245db..6dbb2283 100644
--- a/chrome/browser/ash/child_accounts/screen_time_controller_factory.cc
+++ b/chrome/browser/ash/child_accounts/screen_time_controller_factory.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/ash/child_accounts/screen_time_controller.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
-namespace chromeos {
+namespace ash {
// static
ScreenTimeController* ScreenTimeControllerFactory::GetForBrowserContext(
@@ -37,4 +37,4 @@
return new ScreenTimeController(context);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/screen_time_controller_factory.h b/chrome/browser/ash/child_accounts/screen_time_controller_factory.h
index 56881461..5768a677 100644
--- a/chrome/browser/ash/child_accounts/screen_time_controller_factory.h
+++ b/chrome/browser/ash/child_accounts/screen_time_controller_factory.h
@@ -10,9 +10,9 @@
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
class ScreenTimeController;
// Singleton that owns all ScreenTimeController and associates them with
@@ -38,6 +38,11 @@
DISALLOW_COPY_AND_ASSIGN(ScreenTimeControllerFactory);
};
+} // namespace ash
+
+// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
+namespace chromeos {
+using ::ash::ScreenTimeControllerFactory;
} // namespace chromeos
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_SCREEN_TIME_CONTROLLER_FACTORY_H_
diff --git a/chrome/browser/ash/child_accounts/secondary_account_consent_logger.cc b/chrome/browser/ash/child_accounts/secondary_account_consent_logger.cc
index 232103f..52f5876 100644
--- a/chrome/browser/ash/child_accounts/secondary_account_consent_logger.cc
+++ b/chrome/browser/ash/child_accounts/secondary_account_consent_logger.cc
@@ -74,10 +74,10 @@
})");
std::string GetOrCreateEduCoexistenceId(PrefService* pref_service) {
- std::string id = pref_service->GetString(chromeos::prefs::kEduCoexistenceId);
+ std::string id = pref_service->GetString(ash::prefs::kEduCoexistenceId);
if (id.empty()) {
id = base::GenerateGUID();
- pref_service->SetString(chromeos::prefs::kEduCoexistenceId, id);
+ pref_service->SetString(ash::prefs::kEduCoexistenceId, id);
}
return id;
}
@@ -87,10 +87,10 @@
// static
void SecondaryAccountConsentLogger::RegisterPrefs(
PrefRegistrySimple* registry) {
- registry->RegisterStringPref(chromeos::prefs::kEduCoexistenceId,
+ registry->RegisterStringPref(ash::prefs::kEduCoexistenceId,
std::string() /* default_value */);
registry->RegisterStringPref(
- chromeos::prefs::kEduCoexistenceSecondaryAccountsInvalidationVersion,
+ ash::prefs::kEduCoexistenceSecondaryAccountsInvalidationVersion,
"iv2153049" /* default_value, the first invalidation version */);
}
diff --git a/chrome/browser/ash/child_accounts/secondary_account_consent_logger.h b/chrome/browser/ash/child_accounts/secondary_account_consent_logger.h
index fdff29e..1b0dac8 100644
--- a/chrome/browser/ash/child_accounts/secondary_account_consent_logger.h
+++ b/chrome/browser/ash/child_accounts/secondary_account_consent_logger.h
@@ -19,7 +19,7 @@
namespace base {
class DictionaryValue;
-}
+} // namespace base
namespace signin {
struct AccessTokenInfo;
diff --git a/chrome/browser/ash/child_accounts/secondary_account_consent_logger_unittest.cc b/chrome/browser/ash/child_accounts/secondary_account_consent_logger_unittest.cc
index d80d0dc..0baf5f5 100644
--- a/chrome/browser/ash/child_accounts/secondary_account_consent_logger_unittest.cc
+++ b/chrome/browser/ash/child_accounts/secondary_account_consent_logger_unittest.cc
@@ -67,7 +67,7 @@
void SetUp() {
SecondaryAccountConsentLogger::RegisterPrefs(local_state_.registry());
- local_state_.SetUserPref(chromeos::prefs::kEduCoexistenceId,
+ local_state_.SetUserPref(ash::prefs::kEduCoexistenceId,
std::make_unique<base::Value>(kChromeSyncId));
}
diff --git a/chrome/browser/ash/child_accounts/time_limit_notifier.cc b/chrome/browser/ash/child_accounts/time_limit_notifier.cc
index b492d5b..dfa5fd0 100644
--- a/chrome/browser/ash/child_accounts/time_limit_notifier.cc
+++ b/chrome/browser/ash/child_accounts/time_limit_notifier.cc
@@ -21,7 +21,7 @@
#include "ui/message_center/public/cpp/notification.h"
#include "url/gurl.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -167,4 +167,4 @@
}
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/time_limit_notifier.h b/chrome/browser/ash/child_accounts/time_limit_notifier.h
index 496a1a24..bb1b326e 100644
--- a/chrome/browser/ash/child_accounts/time_limit_notifier.h
+++ b/chrome/browser/ash/child_accounts/time_limit_notifier.h
@@ -13,13 +13,13 @@
namespace base {
class SequencedTaskRunner;
-}
+} // namespace base
namespace content {
class BrowserContext;
-}
+} // namespace content
-namespace chromeos {
+namespace ash {
// Schedules warning notifications for screen time usage or bed time limits.
class TimeLimitNotifier {
@@ -57,6 +57,6 @@
DISALLOW_COPY_AND_ASSIGN(TimeLimitNotifier);
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMIT_NOTIFIER_H_
diff --git a/chrome/browser/ash/child_accounts/time_limit_notifier_unittest.cc b/chrome/browser/ash/child_accounts/time_limit_notifier_unittest.cc
index 3b7df573..caae8ff 100644
--- a/chrome/browser/ash/child_accounts/time_limit_notifier_unittest.cc
+++ b/chrome/browser/ash/child_accounts/time_limit_notifier_unittest.cc
@@ -13,7 +13,7 @@
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
class TimeLimitNotifierTest : public testing::Test {
public:
@@ -189,4 +189,4 @@
HasPolicyUpdateNotification(TimeLimitNotifier::LimitType::kBedTime));
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/time_limit_override.cc b/chrome/browser/ash/child_accounts/time_limit_override.cc
index bd246de..40eb4b4 100644
--- a/chrome/browser/ash/child_accounts/time_limit_override.cc
+++ b/chrome/browser/ash/child_accounts/time_limit_override.cc
@@ -10,7 +10,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
-namespace chromeos {
+namespace ash {
namespace usage_time_limit {
namespace {
@@ -144,4 +144,4 @@
}
} // namespace usage_time_limit
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/time_limit_override.h b/chrome/browser/ash/child_accounts/time_limit_override.h
index 925f885..35257d1 100644
--- a/chrome/browser/ash/child_accounts/time_limit_override.h
+++ b/chrome/browser/ash/child_accounts/time_limit_override.h
@@ -15,7 +15,7 @@
class Value;
} // namespace base
-namespace chromeos {
+namespace ash {
namespace usage_time_limit {
class TimeLimitOverride {
@@ -80,14 +80,6 @@
};
} // namespace usage_time_limit
-} // namespace chromeos
-
-// TODO(https://crbug.com/1164001): remove when //c/b/ash/child_accounts moved
-// to ash.
-namespace ash {
-namespace usage_time_limit {
-using ::chromeos::usage_time_limit::TimeLimitOverride;
-} // namespace usage_time_limit
} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMIT_OVERRIDE_H_
diff --git a/chrome/browser/ash/child_accounts/time_limit_test_utils.cc b/chrome/browser/ash/child_accounts/time_limit_test_utils.cc
index 13c57d36..843943f 100644
--- a/chrome/browser/ash/child_accounts/time_limit_test_utils.cc
+++ b/chrome/browser/ash/child_accounts/time_limit_test_utils.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/optional.h"
-namespace chromeos {
+namespace ash {
namespace time_limit_test_utils {
namespace {
@@ -190,4 +190,4 @@
}
} // namespace time_limit_test_utils
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/time_limit_test_utils.h b/chrome/browser/ash/child_accounts/time_limit_test_utils.h
index 6ee293b..e33ff15 100644
--- a/chrome/browser/ash/child_accounts/time_limit_test_utils.h
+++ b/chrome/browser/ash/child_accounts/time_limit_test_utils.h
@@ -14,7 +14,7 @@
#include "base/values.h"
#include "chrome/browser/ash/child_accounts/time_limit_override.h"
-namespace chromeos {
+namespace ash {
namespace time_limit_test_utils {
// Days of the week that should be used to create the Time Limit policy.
@@ -90,27 +90,6 @@
std::string PolicyToString(const base::Value& policy);
} // namespace time_limit_test_utils
-} // namespace chromeos
-
-// TODO(https://crbug.com/1164001): remove when //c/b/ash/child_accounts moved
-// to ash.
-namespace ash {
-namespace time_limit_test_utils {
-using ::chromeos::time_limit_test_utils::AddOverride;
-using ::chromeos::time_limit_test_utils::AddOverrideWithDuration;
-using ::chromeos::time_limit_test_utils::AddTimeUsageLimit;
-using ::chromeos::time_limit_test_utils::AddTimeWindowLimit;
-using ::chromeos::time_limit_test_utils::CreateTime;
-using ::chromeos::time_limit_test_utils::CreateTimeLimitPolicy;
-using ::chromeos::time_limit_test_utils::kFriday;
-using ::chromeos::time_limit_test_utils::kMonday;
-using ::chromeos::time_limit_test_utils::kSaturday;
-using ::chromeos::time_limit_test_utils::kSunday;
-using ::chromeos::time_limit_test_utils::kThursday;
-using ::chromeos::time_limit_test_utils::kTuesday;
-using ::chromeos::time_limit_test_utils::kWednesday;
-using ::chromeos::time_limit_test_utils::TimeFromString;
-} // namespace time_limit_test_utils
} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMIT_TEST_UTILS_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_activity_registry.h b/chrome/browser/ash/child_accounts/time_limits/app_activity_registry.h
index 7db43b1..60ed8ea5 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_activity_registry.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_activity_registry.h
@@ -334,11 +334,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::AppActivityRegistry;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_ACTIVITY_REGISTRY_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_activity_report_interface.h b/chrome/browser/ash/child_accounts/time_limits/app_activity_report_interface.h
index 0e66c93..33ea7ce5 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_activity_report_interface.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_activity_report_interface.h
@@ -50,11 +50,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::AppActivityReportInterface;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_ACTIVITY_REPORT_INTERFACE_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_service_wrapper.h b/chrome/browser/ash/child_accounts/time_limits/app_service_wrapper.h
index 3cd6db97..ea19713 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_service_wrapper.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_service_wrapper.h
@@ -12,8 +12,6 @@
#include "base/observer_list.h"
#include "base/observer_list_types.h"
#include "base/time/time.h"
-// TODO(https://crbug.com/1164001): forward declare when moved ash
-#include "chrome/browser/ash/child_accounts/time_limits/app_types.h"
#include "components/services/app_service/public/cpp/app_registry_cache.h"
#include "components/services/app_service/public/cpp/instance_registry.h"
@@ -32,6 +30,7 @@
namespace ash {
namespace app_time {
+class AppId;
struct PauseAppInfo;
// Wrapper around AppService.
@@ -174,11 +173,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::AppServiceWrapper;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_SERVICE_WRAPPER_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc b/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc
index 8b92178..f51bf3f 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc
+++ b/chrome/browser/ash/child_accounts/time_limits/app_time_controller.cc
@@ -574,7 +574,7 @@
void AppTimeController::OpenFamilyLinkApp() {
const std::string app_id = arc::ArcPackageNameToAppId(
- chromeos::ChildUserService::kFamilyLinkHelperAppPackageName, profile_);
+ ChildUserService::kFamilyLinkHelperAppPackageName, profile_);
if (app_service_wrapper_->IsAppInstalled(app_id)) {
// Launch Family Link Help app since it is available.
@@ -587,7 +587,7 @@
apps::AppServiceProxyFactory::IsAppServiceAvailableForProfile(profile_));
apps::AppServiceProxyFactory::GetForProfile(profile_)->LaunchAppWithUrl(
arc::kPlayStoreAppId, ui::EF_NONE,
- GURL(chromeos::ChildUserService::kFamilyLinkHelperAppPlayStoreURL),
+ GURL(ChildUserService::kFamilyLinkHelperAppPlayStoreURL),
apps::mojom::LaunchSource::kFromChromeInternal);
}
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_controller.h b/chrome/browser/ash/child_accounts/time_limits/app_time_controller.h
index c3516ae..c28ab06 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_time_controller.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_time_controller.h
@@ -186,11 +186,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::AppTimeController;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_TIME_CONTROLLER_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_limit_interface.h b/chrome/browser/ash/child_accounts/time_limits/app_time_limit_interface.h
index 6fb6e708..70ddda5 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_time_limit_interface.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_time_limit_interface.h
@@ -56,11 +56,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::AppTimeLimitInterface;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_TIME_LIMIT_INTERFACE_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_limit_utils.h b/chrome/browser/ash/child_accounts/time_limits/app_time_limit_utils.h
index 0ec62619e..2f6d04f1 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_time_limit_utils.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_time_limit_utils.h
@@ -32,11 +32,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::GetChromeAppId;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_TIME_LIMIT_UTILS_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_policy_builder.h b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_policy_builder.h
index 81da1e7..cbde321 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_time_limits_policy_builder.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_time_limits_policy_builder.h
@@ -39,11 +39,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::AppTimeLimitsPolicyBuilder;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_TIME_LIMITS_POLICY_BUILDER_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_time_test_utils.h b/chrome/browser/ash/child_accounts/time_limits/app_time_test_utils.h
index 8230140e2..00fa3aa 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_time_test_utils.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_time_test_utils.h
@@ -32,11 +32,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::CreateExtension;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_TIME_TEST_UTILS_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/app_types.h b/chrome/browser/ash/child_accounts/time_limits/app_types.h
index ef22122..720e967 100644
--- a/chrome/browser/ash/child_accounts/time_limits/app_types.h
+++ b/chrome/browser/ash/child_accounts/time_limits/app_types.h
@@ -258,13 +258,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::AppId;
-using ::ash::app_time::AppLimit;
-using ::ash::app_time::AppRestriction;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_APP_TYPES_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/web_time_calculation_browsertest.cc b/chrome/browser/ash/child_accounts/time_limits/web_time_calculation_browsertest.cc
index 01e3b2e..fd078d4 100644
--- a/chrome/browser/ash/child_accounts/time_limits/web_time_calculation_browsertest.cc
+++ b/chrome/browser/ash/child_accounts/time_limits/web_time_calculation_browsertest.cc
@@ -104,11 +104,11 @@
// During tests, AppService doesn't notify AppActivityRegistry that chrome app
// is installed. Mark chrome as installed here.
- chromeos::ChildUserService* service =
- chromeos::ChildUserServiceFactory::GetForBrowserContext(profile_);
- chromeos::ChildUserService::TestApi test_api(service);
+ ash::ChildUserService* service =
+ ash::ChildUserServiceFactory::GetForBrowserContext(profile_);
+ ash::ChildUserService::TestApi test_api(service);
test_api.app_time_controller()->app_registry()->OnAppInstalled(
- chromeos::app_time::GetChromeAppId());
+ ash::app_time::GetChromeAppId());
}
void WebTimeCalculationBrowserTest::TearDown() {
@@ -143,9 +143,9 @@
ash::app_time::ChromeAppActivityState
WebTimeCalculationBrowserTest::GetChromeAppActivityState() {
- chromeos::ChildUserService* service =
+ ash::ChildUserService* service =
chromeos::ChildUserServiceFactory::GetForBrowserContext(profile_);
- chromeos::ChildUserService::TestApi test_api(service);
+ ash::ChildUserService::TestApi test_api(service);
auto* web_time_activity_provider =
test_api.app_time_controller()->web_time_activity_provider();
return web_time_activity_provider->chrome_app_activty_state();
diff --git a/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer.h b/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer.h
index 7104aaf..0157f1b2 100644
--- a/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer.h
+++ b/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer.h
@@ -62,11 +62,4 @@
} // namespace app_time
} // namespace ash
-// TODO(https://crbug.com/1164001): remove when ChromOS code migration is done.
-namespace chromeos {
-namespace app_time {
-using ::ash::app_time::WebTimeLimitEnforcer;
-} // namespace app_time
-} // namespace chromeos
-
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_TIME_LIMITS_WEB_TIME_LIMIT_ENFORCER_H_
diff --git a/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc b/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc
index 0b561c0b..cd62d2a 100644
--- a/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc
+++ b/chrome/browser/ash/child_accounts/time_limits/web_time_limit_enforcer_browsertest.cc
@@ -169,10 +169,9 @@
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
content::BrowserContext* browser_context = web_contents->GetBrowserContext();
- chromeos::ChildUserService::TestApi child_user_service =
- chromeos::ChildUserService::TestApi(
- chromeos::ChildUserServiceFactory::GetForBrowserContext(
- browser_context));
+ ash::ChildUserService::TestApi child_user_service =
+ ash::ChildUserService::TestApi(
+ ash::ChildUserServiceFactory::GetForBrowserContext(browser_context));
return child_user_service.web_time_enforcer();
}
diff --git a/chrome/browser/ash/child_accounts/usage_time_limit_processor.cc b/chrome/browser/ash/child_accounts/usage_time_limit_processor.cc
index 4aadecb..08b4f71 100644
--- a/chrome/browser/ash/child_accounts/usage_time_limit_processor.cc
+++ b/chrome/browser/ash/child_accounts/usage_time_limit_processor.cc
@@ -14,7 +14,7 @@
#include "base/values.h"
#include "chrome/browser/ash/child_accounts/time_limit_override.h"
-namespace chromeos {
+namespace ash {
namespace usage_time_limit {
namespace internal {
namespace {
@@ -1366,4 +1366,4 @@
}
} // namespace usage_time_limit
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/usage_time_limit_processor.h b/chrome/browser/ash/child_accounts/usage_time_limit_processor.h
index 4dd2c3db..c7b6e75 100644
--- a/chrome/browser/ash/child_accounts/usage_time_limit_processor.h
+++ b/chrome/browser/ash/child_accounts/usage_time_limit_processor.h
@@ -23,7 +23,7 @@
class Value;
} // namespace base
-namespace chromeos {
+namespace ash {
namespace usage_time_limit {
namespace internal {
@@ -212,16 +212,6 @@
const base::Value& time_limit_prefs);
} // namespace usage_time_limit
-} // namespace chromeos
-
-// TODO(https://crbug.com/1164001): remove when //c/b/ash/child_accounts moved
-// to ash.
-namespace ash {
-namespace usage_time_limit {
-using ::chromeos::usage_time_limit::GetState;
-using ::chromeos::usage_time_limit::PolicyType;
-using ::chromeos::usage_time_limit::State;
-} // namespace usage_time_limit
} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_USAGE_TIME_LIMIT_PROCESSOR_H_
diff --git a/chrome/browser/ash/child_accounts/usage_time_limit_processor_unittest.cc b/chrome/browser/ash/child_accounts/usage_time_limit_processor_unittest.cc
index 0879c9cc..1b1a6d8d 100644
--- a/chrome/browser/ash/child_accounts/usage_time_limit_processor_unittest.cc
+++ b/chrome/browser/ash/child_accounts/usage_time_limit_processor_unittest.cc
@@ -15,7 +15,7 @@
#include "chromeos/settings/timezone_settings.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace utils = time_limit_test_utils;
@@ -3049,4 +3049,4 @@
}
} // namespace usage_time_limit
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/usage_time_state_notifier.cc b/chrome/browser/ash/child_accounts/usage_time_state_notifier.cc
index 25bd7d0..4782963 100644
--- a/chrome/browser/ash/child_accounts/usage_time_state_notifier.cc
+++ b/chrome/browser/ash/child_accounts/usage_time_state_notifier.cc
@@ -8,7 +8,7 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "components/session_manager/core/session_manager.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -94,4 +94,4 @@
ChangeUsageTimeState(GetCurrentState());
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/child_accounts/usage_time_state_notifier.h b/chrome/browser/ash/child_accounts/usage_time_state_notifier.h
index 6277df5..d27d2a1 100644
--- a/chrome/browser/ash/child_accounts/usage_time_state_notifier.h
+++ b/chrome/browser/ash/child_accounts/usage_time_state_notifier.h
@@ -13,7 +13,7 @@
#include "chromeos/dbus/power_manager/idle.pb.h"
#include "components/session_manager/core/session_manager_observer.h"
-namespace chromeos {
+namespace ash {
// Notify observers when the state of use of the device changes, that is, when
// the child is using the device or not. We define that the child is not using
@@ -73,6 +73,6 @@
DISALLOW_COPY_AND_ASSIGN(UsageTimeStateNotifier);
};
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_CHILD_ACCOUNTS_USAGE_TIME_STATE_NOTIFIER_H_
diff --git a/chrome/browser/ash/child_accounts/usage_time_state_notifier_unittest.cc b/chrome/browser/ash/child_accounts/usage_time_state_notifier_unittest.cc
index 600b5a7a..a51e4c37 100644
--- a/chrome/browser/ash/child_accounts/usage_time_state_notifier_unittest.cc
+++ b/chrome/browser/ash/child_accounts/usage_time_state_notifier_unittest.cc
@@ -13,7 +13,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace {
@@ -255,4 +255,4 @@
UsageTimeStateNotifier::GetInstance()->RemoveObserver(&observer);
}
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/lock/screen_locker.h b/chrome/browser/ash/login/lock/screen_locker.h
index d4a0f7d..1ca16c7a 100644
--- a/chrome/browser/ash/login/lock/screen_locker.h
+++ b/chrome/browser/ash/login/lock/screen_locker.h
@@ -324,4 +324,9 @@
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove when //c/b/ash/login moved to ash.
+namespace ash {
+using ::chromeos::ScreenLocker;
+} // namespace ash
+
#endif // CHROME_BROWSER_ASH_LOGIN_LOCK_SCREEN_LOCKER_H_
diff --git a/chrome/browser/ash/login/lock/screen_locker_tester.h b/chrome/browser/ash/login/lock/screen_locker_tester.h
index 2b6e09bf..113a2e81 100644
--- a/chrome/browser/ash/login/lock/screen_locker_tester.h
+++ b/chrome/browser/ash/login/lock/screen_locker_tester.h
@@ -51,4 +51,10 @@
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove after //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::ScreenLockerTester;
+} // namespace ash
+
#endif // CHROME_BROWSER_ASH_LOGIN_LOCK_SCREEN_LOCKER_TESTER_H_
diff --git a/chrome/browser/ash/login/test/login_manager_mixin.h b/chrome/browser/ash/login/test/login_manager_mixin.h
index 144827d2..c5735875 100644
--- a/chrome/browser/ash/login/test/login_manager_mixin.h
+++ b/chrome/browser/ash/login/test/login_manager_mixin.h
@@ -163,6 +163,12 @@
// TODO(https://crbug.com/1164001): remove after //chrome/browser/chromeos
// source migration is finished.
-using chromeos::LoginManagerMixin;
+using ::chromeos::LoginManagerMixin;
+namespace ash {
+namespace test {
+using ::chromeos::test::kTestEmail;
+using ::chromeos::test::kTestGaiaId;
+} // namespace test
+} // namespace ash
#endif // CHROME_BROWSER_ASH_LOGIN_TEST_LOGIN_MANAGER_MIXIN_H_
diff --git a/chrome/browser/ash/login/test/user_policy_mixin.h b/chrome/browser/ash/login/test/user_policy_mixin.h
index 3aa5003..e26e8ae8 100644
--- a/chrome/browser/ash/login/test/user_policy_mixin.h
+++ b/chrome/browser/ash/login/test/user_policy_mixin.h
@@ -78,4 +78,10 @@
} // namespace chromeos
+// TODO(https://crbug.com/1164001): remove after //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::UserPolicyMixin;
+} // namespace ash
+
#endif // CHROME_BROWSER_ASH_LOGIN_TEST_USER_POLICY_MIXIN_H_
diff --git a/chrome/browser/chromeos/policy/status_collector/child_status_collector.cc b/chrome/browser/chromeos/policy/status_collector/child_status_collector.cc
index 18aa896d..f327b7a 100644
--- a/chrome/browser/chromeos/policy/status_collector/child_status_collector.cc
+++ b/chrome/browser/chromeos/policy/status_collector/child_status_collector.cc
@@ -157,7 +157,7 @@
chromeos::kReportDeviceBootMode, callback);
// Watch for changes on the device state to calculate the child's active time.
- chromeos::UsageTimeStateNotifier::GetInstance()->AddObserver(this);
+ ash::UsageTimeStateNotifier::GetInstance()->AddObserver(this);
// Fetch the current values of the policies.
UpdateReportingSettings();
@@ -177,7 +177,7 @@
}
ChildStatusCollector::~ChildStatusCollector() {
- chromeos::UsageTimeStateNotifier::GetInstance()->RemoveObserver(this);
+ ash::UsageTimeStateNotifier::GetInstance()->RemoveObserver(this);
}
TimeDelta ChildStatusCollector::GetActiveChildScreenTime() {
@@ -230,10 +230,10 @@
}
void ChildStatusCollector::OnUsageTimeStateChange(
- chromeos::UsageTimeStateNotifier::UsageTimeState state) {
+ ash::UsageTimeStateNotifier::UsageTimeState state) {
UpdateChildUsageTime();
last_state_active_ =
- state == chromeos::UsageTimeStateNotifier::UsageTimeState::ACTIVE;
+ state == ash::UsageTimeStateNotifier::UsageTimeState::ACTIVE;
}
void ChildStatusCollector::UpdateChildUsageTime() {
diff --git a/chrome/browser/chromeos/policy/status_collector/child_status_collector.h b/chrome/browser/chromeos/policy/status_collector/child_status_collector.h
index ff5f595..c253ef7 100644
--- a/chrome/browser/chromeos/policy/status_collector/child_status_collector.h
+++ b/chrome/browser/chromeos/policy/status_collector/child_status_collector.h
@@ -45,7 +45,7 @@
// itself (e.g. OS version). Doesn't include anything related to other users on
// the device.
class ChildStatusCollector : public StatusCollector,
- public chromeos::UsageTimeStateNotifier::Observer {
+ public ash::UsageTimeStateNotifier::Observer {
public:
// Constructor. Callers can inject their own *Fetcher callbacks, e.g. for unit
// testing. A null callback can be passed for any *Fetcher parameter, to use
@@ -79,9 +79,9 @@
static const char* GetTimeSinceLastReportHistogramNameForTest();
protected:
- // chromeos::UsageTimeStateNotifier::Observer:
+ // ash::UsageTimeStateNotifier::Observer:
void OnUsageTimeStateChange(
- chromeos::UsageTimeStateNotifier::UsageTimeState state) override;
+ ash::UsageTimeStateNotifier::UsageTimeState state) override;
// Updates the child's active time.
void UpdateChildUsageTime();
diff --git a/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc
index 36fde374..093fb5c 100644
--- a/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc
+++ b/chrome/browser/chromeos/policy/status_collector/child_status_collector_browsertest.cc
@@ -298,9 +298,9 @@
void SimulateAppActivity(const ash::app_time::AppId& app_id,
TimeDelta duration,
bool should_run_tasks = true) {
- chromeos::ChildUserService::TestApi child_user_service =
- chromeos::ChildUserService::TestApi(
- chromeos::ChildUserServiceFactory::GetForBrowserContext(
+ ash::ChildUserService::TestApi child_user_service =
+ ash::ChildUserService::TestApi(
+ ash::ChildUserServiceFactory::GetForBrowserContext(
testing_profile_.get()));
EXPECT_TRUE(child_user_service.app_time_controller());
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
index 3c812ee..06f24ed05 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -763,12 +763,12 @@
metrics_service_->RegisterMetricsProvider(
std::make_unique<AmbientModeMetricsProvider>());
- if (base::FeatureList::IsEnabled(chromeos::kFamilyUserMetricsProvider)) {
+ if (base::FeatureList::IsEnabled(ash::kFamilyUserMetricsProvider)) {
metrics_service_->RegisterMetricsProvider(
std::make_unique<FamilyUserMetricsProvider>());
}
- if (base::FeatureList::IsEnabled(chromeos::kFamilyLinkUserMetricsProvider)) {
+ if (base::FeatureList::IsEnabled(ash::kFamilyLinkUserMetricsProvider)) {
metrics_service_->RegisterMetricsProvider(
std::make_unique<FamilyLinkUserMetricsProvider>());
}
diff --git a/chrome/browser/metrics/family_link_user_metrics_provider_browsertest.cc b/chrome/browser/metrics/family_link_user_metrics_provider_browsertest.cc
index 7630716..b75f296 100644
--- a/chrome/browser/metrics/family_link_user_metrics_provider_browsertest.cc
+++ b/chrome/browser/metrics/family_link_user_metrics_provider_browsertest.cc
@@ -81,7 +81,7 @@
public:
FamilyLinkUserMetricsProviderTest() {
scoped_feature_list_.InitAndEnableFeature(
- chromeos::kFamilyLinkUserMetricsProvider);
+ ash::kFamilyLinkUserMetricsProvider);
}
protected:
@@ -138,7 +138,7 @@
public:
FamilyLinkUserMetricsProviderGuestModeTest() {
scoped_feature_list_.InitAndEnableFeature(
- chromeos::kFamilyLinkUserMetricsProvider);
+ ash::kFamilyLinkUserMetricsProvider);
}
private:
diff --git a/chrome/browser/metrics/family_user_metrics_provider_browsertest.cc b/chrome/browser/metrics/family_user_metrics_provider_browsertest.cc
index d2f1aa80..b6c2f4e2 100644
--- a/chrome/browser/metrics/family_user_metrics_provider_browsertest.cc
+++ b/chrome/browser/metrics/family_user_metrics_provider_browsertest.cc
@@ -89,8 +89,7 @@
FamilyUserMetricsProvider::FamilyUserLogSegment> {
public:
FamilyUserMetricsProviderTest() {
- scoped_feature_list_.InitAndEnableFeature(
- chromeos::kFamilyUserMetricsProvider);
+ scoped_feature_list_.InitAndEnableFeature(ash::kFamilyUserMetricsProvider);
}
void SetUpInProcessBrowserTestFixture() override {
@@ -191,8 +190,7 @@
: public MixinBasedInProcessBrowserTest {
public:
FamilyUserMetricsProviderGuestModeTest() {
- scoped_feature_list_.InitAndEnableFeature(
- chromeos::kFamilyUserMetricsProvider);
+ scoped_feature_list_.InitAndEnableFeature(ash::kFamilyUserMetricsProvider);
}
private:
@@ -224,8 +222,7 @@
: public MixinBasedInProcessBrowserTest {
protected:
FamilyUserMetricsProviderEphemeralUserTest() {
- scoped_feature_list_.InitAndEnableFeature(
- chromeos::kFamilyUserMetricsProvider);
+ scoped_feature_list_.InitAndEnableFeature(ash::kFamilyUserMetricsProvider);
}
// MixinBasedInProcessBrowserTest:
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 52aba09..4213b8c 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1097,9 +1097,9 @@
chromeos::ClientAppMetadataProviderService::RegisterProfilePrefs(registry);
chromeos::CupsPrintersManager::RegisterProfilePrefs(registry);
chromeos::device_sync::RegisterProfilePrefs(registry);
- chromeos::FamilyUserChromeActivityMetrics::RegisterProfilePrefs(registry);
- chromeos::FamilyUserMetricsService::RegisterProfilePrefs(registry);
- chromeos::FamilyUserSessionMetrics::RegisterProfilePrefs(registry);
+ ash::FamilyUserChromeActivityMetrics::RegisterProfilePrefs(registry);
+ ash::FamilyUserMetricsService::RegisterProfilePrefs(registry);
+ ash::FamilyUserSessionMetrics::RegisterProfilePrefs(registry);
chromeos::InlineLoginHandlerChromeOS::RegisterProfilePrefs(registry);
chromeos::first_run::RegisterProfilePrefs(registry);
chromeos::file_system_provider::RegisterProfilePrefs(registry);
@@ -1120,7 +1120,7 @@
chromeos::quick_answers::prefs::RegisterProfilePrefs(registry);
chromeos::quick_unlock::RegisterProfilePrefs(registry);
chromeos::RegisterSamlProfilePrefs(registry);
- chromeos::ScreenTimeController::RegisterProfilePrefs(registry);
+ ash::ScreenTimeController::RegisterProfilePrefs(registry);
SecondaryAccountConsentLogger::RegisterPrefs(registry);
ash::EduCoexistenceConsentInvalidationController::RegisterProfilePrefs(
registry);
diff --git a/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_browsertest.cc b/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_browsertest.cc
index be508bc..4333563 100644
--- a/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_browsertest.cc
+++ b/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_browsertest.cc
@@ -231,7 +231,7 @@
account.gaia = FakeGaiaMixin::kFakeUserGaiaId;
handler->OnRefreshTokenUpdatedForAccount(account);
- const std::string& accepted_tos = edu_coexistence::GetAcceptedToSVersion(
+ const std::string& accepted_tos = ash::edu_coexistence::GetAcceptedToSVersion(
ProfileManager::GetActiveUserProfile(), FakeGaiaMixin::kFakeUserGaiaId);
EXPECT_EQ(accepted_tos, std::string(kToSVersion));
@@ -258,33 +258,33 @@
Profile* profile = ProfileManager::GetActiveUserProfile();
- edu_coexistence::UpdateAcceptedToSVersionPref(
- profile, edu_coexistence::UserConsentInfo(kUser1GaiaId, kVersion1));
- EXPECT_EQ(edu_coexistence::GetAcceptedToSVersion(profile, kUser1GaiaId),
+ ash::edu_coexistence::UpdateAcceptedToSVersionPref(
+ profile, ash::edu_coexistence::UserConsentInfo(kUser1GaiaId, kVersion1));
+ EXPECT_EQ(ash::edu_coexistence::GetAcceptedToSVersion(profile, kUser1GaiaId),
std::string(kVersion1));
- edu_coexistence::UpdateAcceptedToSVersionPref(
- profile, edu_coexistence::UserConsentInfo(kUser2GaiaId, kVersion1));
- EXPECT_EQ(edu_coexistence::GetAcceptedToSVersion(profile, kUser2GaiaId),
+ ash::edu_coexistence::UpdateAcceptedToSVersionPref(
+ profile, ash::edu_coexistence::UserConsentInfo(kUser2GaiaId, kVersion1));
+ EXPECT_EQ(ash::edu_coexistence::GetAcceptedToSVersion(profile, kUser2GaiaId),
std::string(kVersion1));
- edu_coexistence::UpdateAcceptedToSVersionPref(
- profile, edu_coexistence::UserConsentInfo(kUser3GaiaId, kVersion1));
- EXPECT_EQ(edu_coexistence::GetAcceptedToSVersion(profile, kUser3GaiaId),
+ ash::edu_coexistence::UpdateAcceptedToSVersionPref(
+ profile, ash::edu_coexistence::UserConsentInfo(kUser3GaiaId, kVersion1));
+ EXPECT_EQ(ash::edu_coexistence::GetAcceptedToSVersion(profile, kUser3GaiaId),
std::string(kVersion1));
- edu_coexistence::UpdateAcceptedToSVersionPref(
- profile, edu_coexistence::UserConsentInfo(kUser2GaiaId, kVersion2));
- EXPECT_EQ(edu_coexistence::GetAcceptedToSVersion(profile, kUser2GaiaId),
+ ash::edu_coexistence::UpdateAcceptedToSVersionPref(
+ profile, ash::edu_coexistence::UserConsentInfo(kUser2GaiaId, kVersion2));
+ EXPECT_EQ(ash::edu_coexistence::GetAcceptedToSVersion(profile, kUser2GaiaId),
std::string(kVersion2));
- EXPECT_EQ(edu_coexistence::GetAcceptedToSVersion(profile, kUser1GaiaId),
+ EXPECT_EQ(ash::edu_coexistence::GetAcceptedToSVersion(profile, kUser1GaiaId),
std::string(kVersion1));
- EXPECT_EQ(edu_coexistence::GetAcceptedToSVersion(profile, kUser3GaiaId),
+ EXPECT_EQ(ash::edu_coexistence::GetAcceptedToSVersion(profile, kUser3GaiaId),
std::string(kVersion1));
- edu_coexistence::UpdateAcceptedToSVersionPref(
- profile, edu_coexistence::UserConsentInfo(kUser1GaiaId, kVersion2));
- EXPECT_EQ(edu_coexistence::GetAcceptedToSVersion(profile, kUser1GaiaId),
+ ash::edu_coexistence::UpdateAcceptedToSVersionPref(
+ profile, ash::edu_coexistence::UserConsentInfo(kUser1GaiaId, kVersion2));
+ EXPECT_EQ(ash::edu_coexistence::GetAcceptedToSVersion(profile, kUser1GaiaId),
std::string(kVersion2));
}
diff --git a/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_chromeos.cc b/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_chromeos.cc
index 47ae89d4..38bfdf36 100644
--- a/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_chromeos.cc
+++ b/chrome/browser/ui/webui/chromeos/edu_coexistence/edu_coexistence_login_handler_chromeos.cc
@@ -210,8 +210,8 @@
Profile* profile = ProfileManager::GetActiveUserProfile();
- edu_coexistence::UpdateAcceptedToSVersionPref(
- profile, edu_coexistence::UserConsentInfo(
+ ash::edu_coexistence::UpdateAcceptedToSVersionPref(
+ profile, ash::edu_coexistence::UserConsentInfo(
account_info.gaia, terms_of_service_version_number_));
EduCoexistenceStateTracker::Get()->OnWebUiStateChanged(