| 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/ui/webui/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 544 } |
| 545 if (!username.empty()) | 545 if (!username.empty()) |
| 546 username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username)); | 546 username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username)); |
| 547 | 547 |
| 548 values->SetString("username", username); | 548 values->SetString("username", username); |
| 549 #endif | 549 #endif |
| 550 // Pass along sync status early so it will be available during page init. | 550 // Pass along sync status early so it will be available during page init. |
| 551 values->Set("syncData", GetSyncStateDictionary().release()); | 551 values->Set("syncData", GetSyncStateDictionary().release()); |
| 552 | 552 |
| 553 values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); | 553 values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); |
| 554 |
| 555 base::string16 rappor_url = base::ASCIIToUTF16(chrome::kRapporLearnMoreURL); |
| 556 values->SetString("enableRappor", |
| 557 l10n_util::GetStringFUTF16(IDS_OPTIONS_ENABLE_RAPPOR, rappor_url)); |
| 554 values->SetString("doNotTrackLearnMoreURL", chrome::kDoNotTrackLearnMoreURL); | 558 values->SetString("doNotTrackLearnMoreURL", chrome::kDoNotTrackLearnMoreURL); |
| 555 | 559 |
| 556 #if !defined(OS_CHROMEOS) | 560 #if !defined(OS_CHROMEOS) |
| 557 values->SetBoolean("metricsReportingEnabledAtStart", | 561 values->SetBoolean("metricsReportingEnabledAtStart", |
| 558 ChromeMetricsServiceAccessor::IsMetricsReportingEnabled()); | 562 ChromeMetricsServiceAccessor::IsMetricsReportingEnabled()); |
| 559 #endif | 563 #endif |
| 560 | 564 |
| 561 #if defined(OS_CHROMEOS) | 565 #if defined(OS_CHROMEOS) |
| 562 // TODO(pastarmovj): replace this with a call to the CrosSettings list | 566 // TODO(pastarmovj): replace this with a call to the CrosSettings list |
| 563 // handling functionality to come. | 567 // handling functionality to come. |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2117 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
| 2114 const policy::PolicyMap& previous, | 2118 const policy::PolicyMap& previous, |
| 2115 const policy::PolicyMap& current) { | 2119 const policy::PolicyMap& current) { |
| 2116 std::set<std::string> different_keys; | 2120 std::set<std::string> different_keys; |
| 2117 current.GetDifferingKeys(previous, &different_keys); | 2121 current.GetDifferingKeys(previous, &different_keys); |
| 2118 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2122 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
| 2119 SetupMetricsReportingCheckbox(); | 2123 SetupMetricsReportingCheckbox(); |
| 2120 } | 2124 } |
| 2121 | 2125 |
| 2122 } // namespace options | 2126 } // namespace options |
| OLD | NEW |