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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
556 } | 556 } |
557 if (!username.empty()) | 557 if (!username.empty()) |
558 username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username)); | 558 username = gaia::SanitizeEmail(gaia::CanonicalizeEmail(username)); |
559 | 559 |
560 values->SetString("username", username); | 560 values->SetString("username", username); |
561 #endif | 561 #endif |
562 // Pass along sync status early so it will be available during page init. | 562 // Pass along sync status early so it will be available during page init. |
563 values->Set("syncData", GetSyncStateDictionary().release()); | 563 values->Set("syncData", GetSyncStateDictionary().release()); |
564 | 564 |
565 values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); | 565 values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL); |
566 | |
567 base::string16 rappor_url = base::ASCIIToUTF16(chrome::kRapporLearnMoreURL); | |
568 values->SetString("enableRappor", | |
569 l10n_util::GetStringFUTF16(IDS_OPTIONS_ENABLE_RAPPOR, rappor_url)); | |
Alexei Svitkine (slow)
2015/02/06 22:31:11
This should be indented 2 more.
Steven Holte
2015/02/07 02:26:21
Done.
| |
566 values->SetString("doNotTrackLearnMoreURL", chrome::kDoNotTrackLearnMoreURL); | 570 values->SetString("doNotTrackLearnMoreURL", chrome::kDoNotTrackLearnMoreURL); |
567 | 571 |
568 #if !defined(OS_CHROMEOS) | 572 #if !defined(OS_CHROMEOS) |
569 values->SetBoolean("metricsReportingEnabledAtStart", | 573 values->SetBoolean("metricsReportingEnabledAtStart", |
570 ChromeMetricsServiceAccessor::IsMetricsReportingEnabled()); | 574 ChromeMetricsServiceAccessor::IsMetricsReportingEnabled()); |
571 #endif | 575 #endif |
572 | 576 |
573 #if defined(OS_CHROMEOS) | 577 #if defined(OS_CHROMEOS) |
574 // TODO(pastarmovj): replace this with a call to the CrosSettings list | 578 // TODO(pastarmovj): replace this with a call to the CrosSettings list |
575 // handling functionality to come. | 579 // handling functionality to come. |
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2129 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2133 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
2130 const policy::PolicyMap& previous, | 2134 const policy::PolicyMap& previous, |
2131 const policy::PolicyMap& current) { | 2135 const policy::PolicyMap& current) { |
2132 std::set<std::string> different_keys; | 2136 std::set<std::string> different_keys; |
2133 current.GetDifferingKeys(previous, &different_keys); | 2137 current.GetDifferingKeys(previous, &different_keys); |
2134 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2138 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
2135 SetupMetricsReportingCheckbox(); | 2139 SetupMetricsReportingCheckbox(); |
2136 } | 2140 } |
2137 | 2141 |
2138 } // namespace options | 2142 } // namespace options |
OLD | NEW |