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

Unified Diff: chrome/browser/ui/webui/flags_ui.cc

Issue 1411453004: Componentize internal class FlagsState in flags_ui component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@feature_entry
Patch Set: Rebase Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/settings/owner_flags_storage.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/flags_ui.cc
diff --git a/chrome/browser/ui/webui/flags_ui.cc b/chrome/browser/ui/webui/flags_ui.cc
index ceed3418605f5221a0302959c4b291f824e8f6fb..bd26150358fc54ae3df299735c21dea37b31adf7 100644
--- a/chrome/browser/ui/webui/flags_ui.cc
+++ b/chrome/browser/ui/webui/flags_ui.cc
@@ -112,7 +112,7 @@ content::WebUIDataSource* CreateFlagsUIHTMLSource() {
// The handler for Javascript messages for the about:flags page.
class FlagsDOMHandler : public WebUIMessageHandler {
public:
- FlagsDOMHandler() : access_(about_flags::kGeneralAccessFlagsOnly),
+ FlagsDOMHandler() : access_(flags_ui::kGeneralAccessFlagsOnly),
experimental_features_requested_(false) {
}
~FlagsDOMHandler() override {}
@@ -121,7 +121,7 @@ class FlagsDOMHandler : public WebUIMessageHandler {
// access. If there were flags experiments requested from javascript before
// this was called, it calls |HandleRequestExperimentalFeatures| again.
void Init(flags_ui::FlagsStorage* flags_storage,
- about_flags::FlagAccess access);
+ flags_ui::FlagAccess access);
// WebUIMessageHandler implementation.
void RegisterMessages() override;
@@ -140,7 +140,7 @@ class FlagsDOMHandler : public WebUIMessageHandler {
private:
scoped_ptr<flags_ui::FlagsStorage> flags_storage_;
- about_flags::FlagAccess access_;
+ flags_ui::FlagAccess access_;
bool experimental_features_requested_;
DISALLOW_COPY_AND_ASSIGN(FlagsDOMHandler);
@@ -166,7 +166,7 @@ void FlagsDOMHandler::RegisterMessages() {
}
void FlagsDOMHandler::Init(flags_ui::FlagsStorage* flags_storage,
- about_flags::FlagAccess access) {
+ flags_ui::FlagAccess access) {
flags_storage_.reset(flags_storage);
access_ = access;
@@ -195,7 +195,7 @@ void FlagsDOMHandler::HandleRequestExperimentalFeatures(
results.SetBoolean(flags_ui::kNeedsRestart,
about_flags::IsRestartNeededToCommitChanges());
results.SetBoolean(flags_ui::kShowOwnerWarning,
- access_ == about_flags::kGeneralAccessFlagsOnly);
+ access_ == flags_ui::kGeneralAccessFlagsOnly);
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
version_info::Channel channel = chrome::GetChannel();
@@ -236,7 +236,7 @@ void FlagsDOMHandler::HandleRestartBrowser(const base::ListValue* args) {
base::CommandLine user_flags(base::CommandLine::NO_PROGRAM);
about_flags::ConvertFlagsToSwitches(flags_storage_.get(),
&user_flags,
- about_flags::kAddSentinels);
+ flags_ui::kAddSentinels);
base::CommandLine::StringVector flags;
// argv[0] is the program name |base::CommandLine::NO_PROGRAM|.
flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
@@ -278,11 +278,11 @@ void FinishInitialization(base::WeakPtr<FlagsUI> flags_ui,
profile);
dom_handler->Init(new chromeos::about_flags::OwnerFlagsStorage(
profile->GetPrefs(), service),
- about_flags::kOwnerAccessToFlags);
+ flags_ui::kOwnerAccessToFlags);
} else {
dom_handler->Init(
new flags_ui::PrefServiceFlagsStorage(profile->GetPrefs()),
- about_flags::kGeneralAccessFlagsOnly);
+ flags_ui::kGeneralAccessFlagsOnly);
}
}
#endif
@@ -319,7 +319,7 @@ FlagsUI::FlagsUI(content::WebUI* web_ui)
#else
handler->Init(
new flags_ui::PrefServiceFlagsStorage(g_browser_process->local_state()),
- about_flags::kOwnerAccessToFlags);
+ flags_ui::kOwnerAccessToFlags);
#endif
// Set up the about:flags source.
« no previous file with comments | « chrome/browser/chromeos/settings/owner_flags_storage.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698