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/flags_ui.h" | 5 #include "chrome/browser/ui/webui/flags_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/memory/ref_counted_memory.h" | 11 #include "base/memory/ref_counted_memory.h" |
12 #include "base/prefs/pref_registry_simple.h" | 12 #include "base/prefs/pref_registry_simple.h" |
13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/about_flags.h" | 16 #include "chrome/browser/about_flags.h" |
17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/lifetime/application_lifetime.h" | 18 #include "chrome/browser/lifetime/application_lifetime.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/common/chrome_version_info.h" | 20 #include "chrome/common/chrome_version_info.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/browser/web_ui.h" | 24 #include "content/public/browser/web_ui.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // If the owner managed to set the flags pref on his own profile clear it | 255 // If the owner managed to set the flags pref on his own profile clear it |
256 // because it will never be accessible anymore. | 256 // because it will never be accessible anymore. |
257 if (profile->GetPrefs()->HasPrefPath(prefs::kEnabledLabsExperiments)) | 257 if (profile->GetPrefs()->HasPrefPath(prefs::kEnabledLabsExperiments)) |
258 profile->GetPrefs()->ClearPref(prefs::kEnabledLabsExperiments); | 258 profile->GetPrefs()->ClearPref(prefs::kEnabledLabsExperiments); |
259 } | 259 } |
260 | 260 |
261 // Set up the about:flags source. | 261 // Set up the about:flags source. |
262 content::WebUIDataSource::Add(profile, CreateFlagsUIHTMLSource()); | 262 content::WebUIDataSource::Add(profile, CreateFlagsUIHTMLSource()); |
263 } | 263 } |
264 #endif | 264 #endif |
OLD | NEW |