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

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

Issue 619263002: Remove chrome://welcome page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename the test again Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/welcome_handler_android.h ('k') | chrome/browser/ui/webui/welcome_ui_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/welcome_handler_android.cc
diff --git a/chrome/browser/ui/webui/welcome_handler_android.cc b/chrome/browser/ui/webui/welcome_handler_android.cc
deleted file mode 100644
index a854fdeb764a1148ab09b6637136d643a0218be5..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/welcome_handler_android.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/webui/welcome_handler_android.h"
-
-#include "base/bind.h"
-#include "base/values.h"
-#include "chrome/browser/android/chromium_application.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/sync/profile_sync_service_factory.h"
-#include "content/public/browser/web_ui.h"
-
-WelcomeHandler::WelcomeHandler()
- : sync_service_(NULL),
- observer_manager_(this),
- is_sync_footer_visible_(false) {}
-
-WelcomeHandler::~WelcomeHandler() {}
-
-void WelcomeHandler::RegisterMessages() {
- web_ui()->RegisterMessageCallback(
- "updateSyncFooterVisibility",
- base::Bind(&WelcomeHandler::HandleUpdateSyncFooterVisibility,
- base::Unretained(this)));
-
- web_ui()->RegisterMessageCallback(
- "showSyncSettings",
- base::Bind(&WelcomeHandler::HandleShowSyncSettings,
- base::Unretained(this)));
-
- web_ui()->RegisterMessageCallback(
- "showTermsOfService",
- base::Bind(&WelcomeHandler::HandleShowTermsOfService,
- base::Unretained(this)));
-
- // Register for callbacks
- sync_service_ = ProfileSyncServiceFactory::GetInstance()->GetForProfile(
- Profile::FromWebUI(web_ui()));
- if (sync_service_)
- observer_manager_.Add(sync_service_);
-}
-
-void WelcomeHandler::HandleUpdateSyncFooterVisibility(
- const base::ListValue* args) {
- UpdateSyncFooterVisibility(true);
-}
-
-void WelcomeHandler::HandleShowSyncSettings(const base::ListValue* args) {
- chrome::android::ChromiumApplication::ShowSyncSettings();
-}
-
-void WelcomeHandler::HandleShowTermsOfService(const base::ListValue* args) {
- chrome::android::ChromiumApplication::ShowTermsOfServiceDialog();
-}
-
-void WelcomeHandler::OnStateChanged() {
- UpdateSyncFooterVisibility(false);
-}
-
-void WelcomeHandler::UpdateSyncFooterVisibility(bool forced) {
- bool is_sync_enabled =
- sync_service_ && sync_service_->IsSyncEnabledAndLoggedIn();
-
- if (forced || is_sync_footer_visible_ != is_sync_enabled) {
- is_sync_footer_visible_ = is_sync_enabled;
- web_ui()->CallJavascriptFunction("welcome.setSyncFooterVisible",
- base::FundamentalValue(is_sync_enabled));
- }
-}
« no previous file with comments | « chrome/browser/ui/webui/welcome_handler_android.h ('k') | chrome/browser/ui/webui/welcome_ui_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698