Restrict access to profile type to reduce possible misuses.

Profile::GetProfileType() is made protected to persuade usage of
profile type functions (IsRegularProfile, IsIncognito, IsGuestProfile).

Bug: 947933
Change-Id: Ie049488fa714002b3a0372946040fef82672d440
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611986
Reviewed-by: Marc Treib <[email protected]>
Reviewed-by: Mihai Sardarescu <[email protected]>
Commit-Queue: Ramin Halavati <[email protected]>
Cr-Commit-Position: refs/heads/master@{#661299}
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 0f4d4b11..b9acc12 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1713,7 +1713,7 @@
 
   // Handoff is not allowed from an incognito profile. To err on the safe side,
   // also disallow Handoff from a guest profile.
-  if (profile->GetProfileType() != Profile::REGULAR_PROFILE)
+  if (!profile->IsRegularProfile())
     return GURL();
 
   if (!webContents)