| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/policy/browser_policy_connector.h" | 5 #include "chrome/browser/policy/browser_policy_connector.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 L"live\\.com", | 396 L"live\\.com", |
| 397 L"mail\\.ru", | 397 L"mail\\.ru", |
| 398 L"msn\\.com", | 398 L"msn\\.com", |
| 399 L"qq\\.com", | 399 L"qq\\.com", |
| 400 L"yahoo(\\.co|\\.com|)\\.[^.]+", // yahoo.com, yahoo.co.uk, yahoo.com.tw | 400 L"yahoo(\\.co|\\.com|)\\.[^.]+", // yahoo.com, yahoo.co.uk, yahoo.com.tw |
| 401 L"yandex\\.ru", | 401 L"yandex\\.ru", |
| 402 }; | 402 }; |
| 403 const string16 domain = | 403 const string16 domain = |
| 404 UTF8ToUTF16(gaia::ExtractDomainName(gaia::CanonicalizeEmail(username))); | 404 UTF8ToUTF16(gaia::ExtractDomainName(gaia::CanonicalizeEmail(username))); |
| 405 for (size_t i = 0; i < arraysize(kNonManagedDomainPatterns); i++) { | 405 for (size_t i = 0; i < arraysize(kNonManagedDomainPatterns); i++) { |
| 406 string16 pattern = WideToUTF16(kNonManagedDomainPatterns[i]); | 406 string16 pattern = base::WideToUTF16(kNonManagedDomainPatterns[i]); |
| 407 if (MatchDomain(domain, pattern)) | 407 if (MatchDomain(domain, pattern)) |
| 408 return true; | 408 return true; |
| 409 } | 409 } |
| 410 return false; | 410 return false; |
| 411 } | 411 } |
| 412 | 412 |
| 413 // static | 413 // static |
| 414 void BrowserPolicyConnector::RegisterPrefs(PrefRegistrySimple* registry) { | 414 void BrowserPolicyConnector::RegisterPrefs(PrefRegistrySimple* registry) { |
| 415 registry->RegisterIntegerPref(prefs::kUserPolicyRefreshRate, | 415 registry->RegisterIntegerPref(prefs::kUserPolicyRefreshRate, |
| 416 kDefaultPolicyRefreshRateMs); | 416 kDefaultPolicyRefreshRateMs); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 return new AsyncPolicyProvider(loader.Pass()); | 534 return new AsyncPolicyProvider(loader.Pass()); |
| 535 } else { | 535 } else { |
| 536 return NULL; | 536 return NULL; |
| 537 } | 537 } |
| 538 #else | 538 #else |
| 539 return NULL; | 539 return NULL; |
| 540 #endif | 540 #endif |
| 541 } | 541 } |
| 542 | 542 |
| 543 } // namespace policy | 543 } // namespace policy |
| OLD | NEW |