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

Unified Diff: chrome/browser/ui/webui/signin/sync_confirmation_ui.cc

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 11 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
Index: chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b5e1a6c5d30581a414663194f6318f93afd0d0aa
--- /dev/null
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
@@ -0,0 +1,35 @@
+// Copyright 2015 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/signin/sync_confirmation_ui.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h"
+#include "chrome/grit/generated_resources.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "grit/browser_resources.h"
+
+SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui)
+ : WebDialogUI(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+ content::WebUIDataSource* source =
+ content::WebUIDataSource::Create("sync-confirmation");
Dan Beam 2016/01/21 03:57:33 please use kChromeUISyncConfirmationHost like ever
anthonyvd 2016/01/21 22:36:11 Done.
+ source->SetJsonPath("strings.js");
+ source->SetDefaultResource(IDR_SYNC_CONFIRMATION_HTML);
+ source->AddResourcePath("sync-confirmation.css", IDR_SYNC_CONFIRMATION_CSS);
+ source->AddResourcePath("sync-confirmation.js", IDR_SYNC_CONFIRMATION_JS);
Dan Beam 2016/01/21 03:57:33 replace - with _ in the file names
anthonyvd 2016/01/21 22:36:11 Done.
+
+ source->AddLocalizedString("syncConfirmationTitle",
+ IDS_SYNC_CONFIRMATION_TITLE);
+ source->AddLocalizedString("syncConfirmationBody",
+ IDS_SYNC_CONFIRMATION_BODY);
+ source->AddLocalizedString("syncConfirmationConfirmLabel",
+ IDS_SYNC_CONFIRMATION_CONFIRM_BUTTON_LABEL);
+ source->AddLocalizedString("syncConfirmationUndoLabel",
+ IDS_SYNC_CONFIRMATION_UNDO_BUTTON_LABEL);
+
+ content::WebUIDataSource::Add(profile, source);
+ web_ui->AddMessageHandler(new SyncConfirmationHandler);
+}

Powered by Google App Engine
This is Rietveld 408576698