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/managed_user_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/managed_user_settings_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/first_run/first_run.h" | 13 #include "chrome/browser/first_run/first_run.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "content/public/browser/user_metrics.h" | 15 #include "content/public/browser/user_metrics.h" |
16 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
| 17 #include "grit/chromium_strings.h" |
17 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
18 #include "grit/locale_settings.h" | 19 #include "grit/locale_settings.h" |
19 | 20 |
20 using content::UserMetricsAction; | 21 using content::UserMetricsAction; |
21 | 22 |
22 namespace options { | 23 namespace options { |
23 | 24 |
24 ManagedUserSettingsHandler::ManagedUserSettingsHandler() { | 25 ManagedUserSettingsHandler::ManagedUserSettingsHandler() { |
25 } | 26 } |
26 | 27 |
(...skipping 15 matching lines...) Expand all Loading... |
42 { "getContentPacks", IDS_GET_CONTENT_PACKS_BUTTON }, | 43 { "getContentPacks", IDS_GET_CONTENT_PACKS_BUTTON }, |
43 { "getContentPacksURL", IDS_GET_CONTENT_PACKS_URL }, | 44 { "getContentPacksURL", IDS_GET_CONTENT_PACKS_URL }, |
44 // Content pack restriction options. | 45 // Content pack restriction options. |
45 { "contentPackSettings", IDS_CONTENT_PACK_SETTINGS_LABEL }, | 46 { "contentPackSettings", IDS_CONTENT_PACK_SETTINGS_LABEL }, |
46 { "outsideContentPacksAllow", IDS_OUTSIDE_CONTENT_PACKS_ALLOW_RADIO }, | 47 { "outsideContentPacksAllow", IDS_OUTSIDE_CONTENT_PACKS_ALLOW_RADIO }, |
47 { "outsideContentPacksWarn", IDS_OUTSIDE_CONTENT_PACKS_WARN_RADIO }, | 48 { "outsideContentPacksWarn", IDS_OUTSIDE_CONTENT_PACKS_WARN_RADIO }, |
48 { "outsideContentPacksBlock", IDS_OUTSIDE_CONTENT_PACKS_BLOCK_RADIO }, | 49 { "outsideContentPacksBlock", IDS_OUTSIDE_CONTENT_PACKS_BLOCK_RADIO }, |
49 // Other managed user settings | 50 // Other managed user settings |
50 { "advancedManagedUserSettings", IDS_ADVANCED_MANAGED_USER_LABEL }, | 51 { "advancedManagedUserSettings", IDS_ADVANCED_MANAGED_USER_LABEL }, |
51 { "enableSafeSearch", IDS_SAFE_SEARCH_ENABLED }, | 52 { "enableSafeSearch", IDS_SAFE_SEARCH_ENABLED }, |
52 { "disableProfileSignIn", IDS_SIGNIN_SYNC_DISABLED }, | 53 { "allowProfileSignIn", IDS_SIGNIN_SYNC_ALLOWED }, |
53 { "disableHistoryDeletion", IDS_HISTORY_DELETION_DISABLED }, | 54 { "disableHistoryDeletion", IDS_HISTORY_DELETION_DISABLED }, |
54 { "usePassphrase", IDS_USE_PASSPHRASE_LABEL }, | 55 { "usePassphrase", IDS_USE_PASSPHRASE_LABEL }, |
55 { "setPassphrase", IDS_SET_PASSPHRASE_BUTTON } | 56 { "setPassphrase", IDS_SET_PASSPHRASE_BUTTON } |
56 }; | 57 }; |
57 | 58 |
58 RegisterStrings(localized_strings, resources, arraysize(resources)); | 59 RegisterStrings(localized_strings, resources, arraysize(resources)); |
59 RegisterTitle(localized_strings, "managedUserSettingsPage", | 60 RegisterTitle(localized_strings, "managedUserSettingsPage", |
60 IDS_MANAGED_USER_SETTINGS_TITLE); | 61 IDS_MANAGED_USER_SETTINGS_TITLE); |
61 | 62 |
62 localized_strings->SetBoolean( | 63 localized_strings->SetBoolean( |
(...skipping 13 matching lines...) Expand all Loading... |
76 if (first_run::IsChromeFirstRun()) { | 77 if (first_run::IsChromeFirstRun()) { |
77 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsFirstRunTime", | 78 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsFirstRunTime", |
78 base::TimeTicks::Now() - start_time_); | 79 base::TimeTicks::Now() - start_time_); |
79 } else { | 80 } else { |
80 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsModifyTime", | 81 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsModifyTime", |
81 base::TimeTicks::Now() - start_time_); | 82 base::TimeTicks::Now() - start_time_); |
82 } | 83 } |
83 } | 84 } |
84 | 85 |
85 } // namespace options | 86 } // namespace options |
OLD | NEW |