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

Side by Side Diff: chrome/browser/ui/webui/options/managed_user_settings_handler.cc

Issue 11783008: Add a lock to the managed user settings page and require authentication for unlocking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT, add test for ManagedUserSettings page. 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/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"
(...skipping 19 matching lines...) Expand all
30 void ManagedUserSettingsHandler::InitializePage() { 30 void ManagedUserSettingsHandler::InitializePage() {
31 start_time_ = base::TimeTicks::Now(); 31 start_time_ = base::TimeTicks::Now();
32 content::RecordAction(UserMetricsAction("ManagedMode_OpenSettings")); 32 content::RecordAction(UserMetricsAction("ManagedMode_OpenSettings"));
33 } 33 }
34 34
35 void ManagedUserSettingsHandler::GetLocalizedValues( 35 void ManagedUserSettingsHandler::GetLocalizedValues(
36 base::DictionaryValue* localized_strings) { 36 base::DictionaryValue* localized_strings) {
37 DCHECK(localized_strings); 37 DCHECK(localized_strings);
38 38
39 static OptionsStringResource resources[] = { 39 static OptionsStringResource resources[] = {
40 // Unlock the settings page to allow editing.
41 { "unlockSettings", IDS_UNLOCK_PASSPHRASE_BUTTON },
40 // Installed content packs. 42 // Installed content packs.
41 { "installedContentPacks", IDS_INSTALLED_CONTENT_PACKS_LABEL }, 43 { "installedContentPacks", IDS_INSTALLED_CONTENT_PACKS_LABEL },
42 { "getContentPacks", IDS_GET_CONTENT_PACKS_BUTTON }, 44 { "getContentPacks", IDS_GET_CONTENT_PACKS_BUTTON },
43 { "getContentPacksURL", IDS_GET_CONTENT_PACKS_URL }, 45 { "getContentPacksURL", IDS_GET_CONTENT_PACKS_URL },
44 // Content pack restriction options. 46 // Content pack restriction options.
45 { "contentPackSettings", IDS_CONTENT_PACK_SETTINGS_LABEL }, 47 { "contentPackSettings", IDS_CONTENT_PACK_SETTINGS_LABEL },
46 { "outsideContentPacksAllow", IDS_OUTSIDE_CONTENT_PACKS_ALLOW_RADIO }, 48 { "outsideContentPacksAllow", IDS_OUTSIDE_CONTENT_PACKS_ALLOW_RADIO },
47 { "outsideContentPacksWarn", IDS_OUTSIDE_CONTENT_PACKS_WARN_RADIO }, 49 { "outsideContentPacksWarn", IDS_OUTSIDE_CONTENT_PACKS_WARN_RADIO },
48 { "outsideContentPacksBlock", IDS_OUTSIDE_CONTENT_PACKS_BLOCK_RADIO }, 50 { "outsideContentPacksBlock", IDS_OUTSIDE_CONTENT_PACKS_BLOCK_RADIO },
49 // Other managed user settings 51 // Other managed user settings
(...skipping 26 matching lines...) Expand all
76 if (first_run::IsChromeFirstRun()) { 78 if (first_run::IsChromeFirstRun()) {
77 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsFirstRunTime", 79 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsFirstRunTime",
78 base::TimeTicks::Now() - start_time_); 80 base::TimeTicks::Now() - start_time_);
79 } else { 81 } else {
80 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsModifyTime", 82 UMA_HISTOGRAM_LONG_TIMES("ManagedMode.UserSettingsModifyTime",
81 base::TimeTicks::Now() - start_time_); 83 base::TimeTicks::Now() - start_time_);
82 } 84 }
83 } 85 }
84 86
85 } // namespace options 87 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698