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/chromeos/settings/cros_settings.h" | 5 #include "chrome/browser/chromeos/settings/cros_settings.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 const base::ListValue* list; | 239 const base::ListValue* list; |
240 if (!GetList(path, &list)) | 240 if (!GetList(path, &list)) |
241 return false; | 241 return false; |
242 | 242 |
243 bool found_wildcard_match = false; | 243 bool found_wildcard_match = false; |
244 for (base::ListValue::const_iterator entry(list->begin()); | 244 for (base::ListValue::const_iterator entry(list->begin()); |
245 entry != list->end(); | 245 entry != list->end(); |
246 ++entry) { | 246 ++entry) { |
247 std::string entry_string; | 247 std::string entry_string; |
248 if (!entry->GetAsString(&entry_string)) { | 248 if (!(*entry)->GetAsString(&entry_string)) { |
249 NOTREACHED(); | 249 NOTREACHED(); |
250 continue; | 250 continue; |
251 } | 251 } |
252 std::string canonicalized_entry( | 252 std::string canonicalized_entry( |
253 gaia::CanonicalizeEmail(gaia::SanitizeEmail(entry_string))); | 253 gaia::CanonicalizeEmail(gaia::SanitizeEmail(entry_string))); |
254 | 254 |
255 if (canonicalized_entry != wildcard_email && | 255 if (canonicalized_entry != wildcard_email && |
256 canonicalized_entry == canonicalized_email) { | 256 canonicalized_entry == canonicalized_email) { |
257 return true; | 257 return true; |
258 } | 258 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 ScopedTestCrosSettings::ScopedTestCrosSettings() { | 349 ScopedTestCrosSettings::ScopedTestCrosSettings() { |
350 CrosSettings::Initialize(); | 350 CrosSettings::Initialize(); |
351 } | 351 } |
352 | 352 |
353 ScopedTestCrosSettings::~ScopedTestCrosSettings() { | 353 ScopedTestCrosSettings::~ScopedTestCrosSettings() { |
354 CrosSettings::Shutdown(); | 354 CrosSettings::Shutdown(); |
355 } | 355 } |
356 | 356 |
357 } // namespace chromeos | 357 } // namespace chromeos |
OLD | NEW |