Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_finder.cc ('k') | chrome/browser/policy/policy_loader_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698