summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/browser_about_handler.cc43
-rw-r--r--chrome/browser/browser_resources.grd1
-rw-r--r--chrome/browser/dom_ui/dom_ui_factory.cc3
-rw-r--r--chrome/browser/dom_ui/sync_internals_html_source.cc49
-rw-r--r--chrome/browser/dom_ui/sync_internals_html_source.h31
-rw-r--r--chrome/browser/dom_ui/sync_internals_message_handler.cc48
-rw-r--r--chrome/browser/dom_ui/sync_internals_message_handler.h39
-rw-r--r--chrome/browser/dom_ui/sync_internals_ui.cc30
-rw-r--r--chrome/browser/dom_ui/sync_internals_ui.h21
-rw-r--r--chrome/browser/resources/sync_internals/sync_index.html (renamed from chrome/browser/sync/resources/about_sync.html)38
-rw-r--r--chrome/browser/resources/sync_internals_resources.grd24
-rw-r--r--chrome/browser/sync/sync_ui_util.cc4
-rw-r--r--chrome/browser/sync/sync_ui_util.h1
-rw-r--r--chrome/chrome.gyp4
-rw-r--r--chrome/chrome_browser.gypi6
-rw-r--r--chrome/chrome_dll.gypi1
-rw-r--r--chrome/common/url_constants.cc5
-rw-r--r--chrome/common/url_constants.h6
-rw-r--r--tools/grit/resource_ids3
19 files changed, 306 insertions, 51 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 0b42acd..83a27f0 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -40,8 +40,6 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
-#include "chrome/browser/sync/profile_sync_service.h"
-#include "chrome/browser/sync/sync_ui_util.h"
#include "chrome/common/about_handler.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_version_info.h"
@@ -80,8 +78,6 @@
#include "third_party/tcmalloc/chromium/src/google/malloc_extension.h"
#endif
-using sync_api::SyncManager;
-
using base::Time;
using base::TimeDelta;
@@ -115,7 +111,6 @@ const char kHistogramsPath[] = "histograms";
const char kMemoryRedirectPath[] = "memory-redirect";
const char kMemoryPath[] = "memory";
const char kStatsPath[] = "stats";
-const char kSyncPath[] = "sync";
const char kTasksPath[] = "tasks";
const char kTcmallocPath[] = "tcmalloc";
const char kTermsPath[] = "terms";
@@ -124,6 +119,7 @@ const char kAboutPath[] = "about";
// Not about:* pages, but included to make about:about look nicer
const char kNetInternalsPath[] = "net-internals";
const char kPluginsPath[] = "plugins";
+const char kSyncInternalsPath[] = "sync-internals";
#if defined(OS_LINUX)
const char kLinuxProxyConfigPath[] = "linux-proxy-config";
@@ -152,7 +148,7 @@ const char *kAllAboutPaths[] = {
kNetInternalsPath,
kPluginsPath,
kStatsPath,
- kSyncPath,
+ kSyncInternalsPath,
kTasksPath,
kTcmallocPath,
kTermsPath,
@@ -688,31 +684,6 @@ std::string AboutVersion(DictionaryValue* localized_strings) {
version_html, localized_strings, "t" /* template root node id */);
}
-
-
-std::string AboutSync() {
- FilePath user_data_dir;
- if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
- return std::string();
- ProfileManager* profile_manager = g_browser_process->profile_manager();
- Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
- ProfileSyncService* service = profile->GetProfileSyncService();
-
- DictionaryValue strings;
- if (!service) {
- strings.SetString("summary", "SYNC DISABLED");
- } else {
- sync_ui_util::ConstructAboutInformation(service, &strings);
- }
-
- static const base::StringPiece sync_html(
- ResourceBundle::GetSharedInstance().GetRawDataResource(
- IDR_ABOUT_SYNC_HTML));
-
- return jstemplate_builder::GetTemplatesHtml(
- sync_html, &strings , "t" /* template root node id */);
-}
-
std::string VersionNumberToString(uint32 value) {
int hi = (value >> 8) & 0xff;
int low = value & 0xff;
@@ -801,8 +772,6 @@ void AboutSource::StartDataRequest(const std::string& path_raw,
} else if (path == kSandboxPath) {
response = AboutSandbox();
#endif
- } else if (path == kSyncPath) {
- response = AboutSync();
}
FinishDataRequest(response, request_id);
@@ -1049,6 +1018,14 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) {
return true;
}
+ // Rewrite about:sync-internals/* URLs (and about:sync, too, for
+ // legacy reasons) to chrome://sync-internals/*
+ if (StartsWithAboutSpecifier(*url, chrome::kAboutSyncInternalsURL) ||
+ StartsWithAboutSpecifier(*url, chrome::kAboutSyncURL)) {
+ *url = RemapAboutURL(chrome::kSyncViewInternalsURL, *url);
+ return true;
+ }
+
// Rewrite about:plugins to chrome://plugins/.
if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutPluginsURL)) {
*url = GURL(chrome::kChromeUIPluginsURL);
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
index e3bc1e4..6a288ba 100644
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -24,7 +24,6 @@ without changes to the corresponding grd file. etaa -->
<include name="IDR_ABOUT_MEMORY_HTML" file="resources\about_memory.html" flattenhtml="true" type="BINDATA" />
</if>
<include name="IDR_ABOUT_STATS_HTML" file="resources\about_stats.html" flattenhtml="true" type="BINDATA" />
- <include name="IDR_ABOUT_SYNC_HTML" file="sync\resources\about_sync.html" flattenhtml="true" type="BINDATA" />
<include name="IDR_ABOUT_VERSION_HTML" file="resources\about_version.html" flattenhtml="true" type="BINDATA" />
<include name="IDR_BOOKMARKS_MANIFEST" file="resources\bookmark_manager\manifest.json" type="BINDATA" />
<include name="IDR_CREDITS_HTML" file="resources\about_credits.html" flattenhtml="true" type="BINDATA" />
diff --git a/chrome/browser/dom_ui/dom_ui_factory.cc b/chrome/browser/dom_ui/dom_ui_factory.cc
index 69081da..2546253 100644
--- a/chrome/browser/dom_ui/dom_ui_factory.cc
+++ b/chrome/browser/dom_ui/dom_ui_factory.cc
@@ -23,6 +23,7 @@
#include "chrome/browser/dom_ui/remoting_ui.h"
#include "chrome/browser/dom_ui/options/options_ui.h"
#include "chrome/browser/dom_ui/slideshow_ui.h"
+#include "chrome/browser/dom_ui/sync_internals_ui.h"
#include "chrome/browser/dom_ui/textfields_ui.h"
#include "chrome/browser/extensions/extension_dom_ui.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -164,6 +165,8 @@ static DOMUIFactoryFunction GetDOMUIFactoryFunction(Profile* profile,
return &NewDOMUI<NetInternalsUI>;
if (url.host() == chrome::kChromeUIPluginsHost)
return &NewDOMUI<PluginsUI>;
+ if (url.host() == chrome::kChromeUISyncInternalsHost)
+ return &NewDOMUI<SyncInternalsUI>;
#if defined(ENABLE_REMOTING)
if (url.host() == chrome::kChromeUIRemotingHost) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/chrome/browser/dom_ui/sync_internals_html_source.cc b/chrome/browser/dom_ui/sync_internals_html_source.cc
new file mode 100644
index 0000000..456c93f
--- /dev/null
+++ b/chrome/browser/dom_ui/sync_internals_html_source.cc
@@ -0,0 +1,49 @@
+// Copyright (c) 2011 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/dom_ui/sync_internals_html_source.h"
+
+#include <algorithm>
+
+#include "app/resource_bundle.h"
+#include "base/message_loop.h"
+#include "base/ref_counted.h"
+#include "base/ref_counted_memory.h"
+#include "base/string_piece.h"
+#include "base/values.h"
+#include "chrome/common/jstemplate_builder.h"
+#include "chrome/common/url_constants.h"
+#include "grit/sync_internals_resources.h"
+
+SyncInternalsHTMLSource::SyncInternalsHTMLSource()
+ : DataSource(chrome::kChromeUISyncInternalsHost,
+ MessageLoop::current()) {}
+
+SyncInternalsHTMLSource::~SyncInternalsHTMLSource() {}
+
+void SyncInternalsHTMLSource::StartDataRequest(const std::string& path,
+ bool is_off_the_record,
+ int request_id) {
+ base::StringPiece html_template(
+ ResourceBundle::GetSharedInstance().GetRawDataResource(
+ IDR_SYNC_INTERNALS_INDEX_HTML));
+ DictionaryValue localized_strings;
+ SetFontAndTextDirection(&localized_strings);
+
+ std::string html(html_template.data(), html_template.size());
+ jstemplate_builder::AppendI18nTemplateSourceHtml(&html);
+ jstemplate_builder::AppendJsTemplateSourceHtml(&html);
+ jstemplate_builder::AppendJsonHtml(&localized_strings, &html);
+ jstemplate_builder::AppendI18nTemplateProcessHtml(&html);
+
+ scoped_refptr<RefCountedBytes> bytes(new RefCountedBytes());
+ bytes->data.resize(html.size());
+ std::copy(html.begin(), html.end(), bytes->data.begin());
+ SendResponse(request_id, bytes);
+}
+
+std::string SyncInternalsHTMLSource::GetMimeType(
+ const std::string& path) const {
+ return "text/html";
+}
diff --git a/chrome/browser/dom_ui/sync_internals_html_source.h b/chrome/browser/dom_ui/sync_internals_html_source.h
new file mode 100644
index 0000000..bb8ab48
--- /dev/null
+++ b/chrome/browser/dom_ui/sync_internals_html_source.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2011 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.
+
+#ifndef CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_HTML_SOURCE_H_
+#define CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_HTML_SOURCE_H_
+#pragma once
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
+
+class SyncInternalsHTMLSource : public ChromeURLDataManager::DataSource {
+ public:
+ SyncInternalsHTMLSource();
+
+ // ChromeURLDataManager::DataSource implementation.
+ virtual void StartDataRequest(const std::string& path,
+ bool is_off_the_record,
+ int request_id);
+ virtual std::string GetMimeType(const std::string& path) const;
+
+ protected:
+ virtual ~SyncInternalsHTMLSource();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SyncInternalsHTMLSource);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_HTML_SOURCE_H_
diff --git a/chrome/browser/dom_ui/sync_internals_message_handler.cc b/chrome/browser/dom_ui/sync_internals_message_handler.cc
new file mode 100644
index 0000000..5ef0084
--- /dev/null
+++ b/chrome/browser/dom_ui/sync_internals_message_handler.cc
@@ -0,0 +1,48 @@
+// Copyright (c) 2011 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/dom_ui/sync_internals_message_handler.h"
+
+#include "base/callback.h"
+#include "base/logging.h"
+#include "base/values.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/sync_ui_util.h"
+
+SyncInternalsMessageHandler::SyncInternalsMessageHandler(Profile* profile)
+ : profile_(profile) {
+ DCHECK(profile_);
+ ProfileSyncService* service = profile_->GetProfileSyncService();
+ if (service) {
+ service->AddObserver(this);
+ }
+ // TODO(akalin): Listen for when the service gets created/destroyed.
+}
+
+SyncInternalsMessageHandler::~SyncInternalsMessageHandler() {
+ ProfileSyncService* service = profile_->GetProfileSyncService();
+ if (service) {
+ service->RemoveObserver(this);
+ }
+}
+
+void SyncInternalsMessageHandler::OnStateChanged() {
+ dom_ui_->CallJavascriptFunction(L"onSyncServiceStateChanged");
+}
+
+void SyncInternalsMessageHandler::RegisterMessages() {
+ dom_ui_->RegisterMessageCallback(
+ "getAboutInfo",
+ NewCallback(
+ this, &SyncInternalsMessageHandler::HandleGetAboutInfo));
+}
+
+void SyncInternalsMessageHandler::HandleGetAboutInfo(const ListValue* args) {
+ ProfileSyncService* service = profile_->GetProfileSyncService();
+ DictionaryValue about_info;
+ sync_ui_util::ConstructAboutInformation(service, &about_info);
+
+ dom_ui_->CallJavascriptFunction(L"onGetAboutInfoFinished", about_info);
+}
diff --git a/chrome/browser/dom_ui/sync_internals_message_handler.h b/chrome/browser/dom_ui/sync_internals_message_handler.h
new file mode 100644
index 0000000..341750e
--- /dev/null
+++ b/chrome/browser/dom_ui/sync_internals_message_handler.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2011 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.
+
+#ifndef CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_MESSAGE_HANDLER_H_
+#define CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_MESSAGE_HANDLER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "chrome/browser/dom_ui/dom_ui.h"
+#include "chrome/browser/sync/profile_sync_service_observer.h"
+
+class Profile;
+
+class SyncInternalsMessageHandler : public DOMMessageHandler,
+ public ProfileSyncServiceObserver {
+ public:
+ // Does not take ownership of |profile|, which must outlive this
+ // object.
+ explicit SyncInternalsMessageHandler(Profile* profile);
+ virtual ~SyncInternalsMessageHandler();
+
+ // ProfileSyncServiceObserver implementation.
+ virtual void OnStateChanged();
+
+ protected:
+ // DOMMessageHandler implementation.
+ virtual void RegisterMessages();
+
+ private:
+ // Callback handlers.
+ void HandleGetAboutInfo(const ListValue* args);
+
+ Profile* profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(SyncInternalsMessageHandler);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_MESSAGE_HANDLER_H_
diff --git a/chrome/browser/dom_ui/sync_internals_ui.cc b/chrome/browser/dom_ui/sync_internals_ui.cc
new file mode 100644
index 0000000..838f5d6
--- /dev/null
+++ b/chrome/browser/dom_ui/sync_internals_ui.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2011 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/dom_ui/sync_internals_ui.h"
+
+#include "base/ref_counted.h"
+#include "base/task.h"
+#include "base/tracked_objects.h"
+#include "chrome/browser/browser_thread.h"
+#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
+#include "chrome/browser/dom_ui/sync_internals_html_source.h"
+#include "chrome/browser/dom_ui/sync_internals_message_handler.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
+
+SyncInternalsUI::SyncInternalsUI(TabContents* contents) : DOMUI(contents) {
+ SyncInternalsMessageHandler* message_handler =
+ new SyncInternalsMessageHandler(contents->profile());
+ message_handler->Attach(this);
+ AddMessageHandler(message_handler);
+
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ ChromeURLDataManager::GetInstance(),
+ &ChromeURLDataManager::AddDataSource,
+ make_scoped_refptr(new SyncInternalsHTMLSource())));
+}
+
+SyncInternalsUI::~SyncInternalsUI() {}
diff --git a/chrome/browser/dom_ui/sync_internals_ui.h b/chrome/browser/dom_ui/sync_internals_ui.h
new file mode 100644
index 0000000..d17f34a
--- /dev/null
+++ b/chrome/browser/dom_ui/sync_internals_ui.h
@@ -0,0 +1,21 @@
+// Copyright (c) 2011 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.
+
+#ifndef CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_UI_H_
+#define CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_UI_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "chrome/browser/dom_ui/dom_ui.h"
+
+class SyncInternalsUI : public DOMUI {
+ public:
+ explicit SyncInternalsUI(TabContents* contents);
+ virtual ~SyncInternalsUI();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SyncInternalsUI);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_SYNC_INTERNALS_UI_H_
diff --git a/chrome/browser/sync/resources/about_sync.html b/chrome/browser/resources/sync_internals/sync_index.html
index 6f62f5d..212a7bf 100644
--- a/chrome/browser/sync/resources/about_sync.html
+++ b/chrome/browser/resources/sync_internals/sync_index.html
@@ -1,13 +1,23 @@
-<html>
-</html>
-<html id="t">
+<!DOCTYPE HTML>
+<html i18n-values="dir:textdirection;">
<head>
-<title>About Sync</title>
+<script>
+function onLoad() {
+ chrome.send('getAboutInfo');
+}
+
+function onGetAboutInfoFinished(aboutInfo) {
+ var aboutInfoDiv = document.getElementById('aboutInfo');
+ jstProcess(new JsEvalContext(aboutInfo), aboutInfoDiv);
+}
+
+function onSyncServiceStateChanged() {
+ chrome.send('getAboutInfo');
+}
+</script>
<style type="text/css">
body {
- font-size: 84%;
- font-family: Arial, Helvetica, sans-serif;
padding: 0.75em;
margin: 0;
min-width: 45em;
@@ -64,16 +74,11 @@ div#header h1 {
color: white;
}
-.desc {
- font-size: 84%;
-}
-
.err {
color: red;
}
div#header p {
- font-size: 84%;
font-style: italic;
padding: 0;
margin: 0;
@@ -85,7 +90,6 @@ div#header p {
table.list {
line-height: 200%;
border-collapse: collapse;
- font-size: 84%;
table-layout: fixed;
}
table.list:not([class*='filtered']) tr:nth-child(odd) td {
@@ -136,10 +140,14 @@ table.list#details .name {
background-repeat: no-repeat;
}
</style>
+
</head>
-<body>
+<body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"
+ onload="onLoad()">
+
+<div id='aboutInfo'>
<div id='header'>
- <h1>About Sync</h1>
+ <h1>Sync Internals</h1>
<p> Sync engine diagnostic data</p>
</div>
<div id='content'>
@@ -210,5 +218,7 @@ table.list#details .name {
</td>
</table>
</div>
+</div>
+
</body>
</html>
diff --git a/chrome/browser/resources/sync_internals_resources.grd b/chrome/browser/resources/sync_internals_resources.grd
new file mode 100644
index 0000000..1c5c98b
--- /dev/null
+++ b/chrome/browser/resources/sync_internals_resources.grd
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This comment is only here because changes to resources are not picked up
+ without changes to the corresponding grd file. -->
+<grit latest_public_release="0" current_release="1">
+ <outputs>
+ <output filename="grit/sync_internals_resources.h" type="rc_header">
+ <emit emit_type='prepend'></emit>
+ </output>
+ <!-- Note: These next two files aren't actually used by Chrome, but they're
+ needed so that Visual Studio doesn't try to continually rebuild this
+ .grd (which it will do if it can't find some relevant output files).
+ Supposedly we could update our .gyp rules to not need this, but I don't
+ know how to do it and this doesn't really cost us anything... -->
+ <output filename="grit/sync_internals_resources_map.cc" type="resource_file_map_source" />
+ <output filename="grit/sync_internals_resources_map.h" type="resource_map_header" />
+ <output filename="sync_internals_resources.pak" type="data_package" />
+ </outputs>
+ <release seq="1">
+ <includes>
+ <!-- TODO(akalin): rename back to index.html once bug 69633 is fixed. -->
+ <include name="IDR_SYNC_INTERNALS_INDEX_HTML" file="sync_internals/sync_index.html" flattenhtml="true" type="BINDATA" />
+ </includes>
+ </release>
+</grit>
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 3f45c38..3e73fbc 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -281,8 +281,8 @@ std::string MakeSyncAuthErrorText(
void ConstructAboutInformation(ProfileSyncService* service,
DictionaryValue* strings) {
- CHECK(strings != NULL);
- if (!service->HasSyncSetupCompleted()) {
+ CHECK(strings);
+ if (!service || !service->HasSyncSetupCompleted()) {
strings->SetString("summary", "SYNC DISABLED");
} else {
sync_api::SyncManager::Status full_status(
diff --git a/chrome/browser/sync/sync_ui_util.h b/chrome/browser/sync/sync_ui_util.h
index 5a168c4..95e3ac7 100644
--- a/chrome/browser/sync/sync_ui_util.h
+++ b/chrome/browser/sync/sync_ui_util.h
@@ -56,6 +56,7 @@ void AddBoolSyncDetail(ListValue* details,
const std::string& stat_name,
bool stat_value);
+// |service| can be NULL.
void ConstructAboutInformation(ProfileSyncService* service,
DictionaryValue* strings);
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index b6104ed..912e57c 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -62,7 +62,8 @@
# it easier for us to reference them internally.
'browser/resources/component_extension_resources.grd',
'browser/resources/net_internals_resources.grd',
- 'browser/resources/shared_resources.grd'
+ 'browser/resources/shared_resources.grd',
+ 'browser/resources/sync_internals_resources.grd',
],
'grit_info_cmd': ['python', '../tools/grit/grit_info.py',
'<@(grit_defines)'],
@@ -1510,6 +1511,7 @@
'<(grit_out_dir)/component_extension_resources.pak',
'<(grit_out_dir)/net_internals_resources.pak',
'<(grit_out_dir)/shared_resources.pak',
+ '<(grit_out_dir)/sync_internals_resources.pak',
],
},
'inputs': [
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 68b508f..1b3bde1 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -986,6 +986,12 @@
'browser/dom_ui/shown_sections_handler.h',
'browser/dom_ui/slideshow_ui.cc',
'browser/dom_ui/slideshow_ui.h',
+ 'browser/dom_ui/sync_internals_html_source.cc',
+ 'browser/dom_ui/sync_internals_html_source.h',
+ 'browser/dom_ui/sync_internals_message_handler.cc',
+ 'browser/dom_ui/sync_internals_message_handler.h',
+ 'browser/dom_ui/sync_internals_ui.cc',
+ 'browser/dom_ui/sync_internals_ui.h',
'browser/dom_ui/textfields_ui.cc',
'browser/dom_ui/textfields_ui.h',
'browser/dom_ui/tips_handler.cc',
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index 5b122ad4..f4bbdcb 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -390,6 +390,7 @@
'<(grit_out_dir)/component_extension_resources.pak',
'<(grit_out_dir)/net_internals_resources.pak',
'<(grit_out_dir)/shared_resources.pak',
+ '<(grit_out_dir)/sync_internals_resources.pak',
],
},
'inputs': [
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 844cb32..8e0dc62 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -64,6 +64,8 @@ const char kAboutMemoryURL[] = "about:memory";
const char kAboutNetInternalsURL[] = "about:net-internals";
const char kAboutPluginsURL[] = "about:plugins";
const char kAboutShorthangURL[] = "about:shorthang";
+const char kAboutSyncURL[] = "about:sync";
+const char kAboutSyncInternalsURL[] = "about:sync-internals";
const char kAboutTermsURL[] = "about:terms";
const char kAboutVaporwareURL[] = "about:vaporware";
const char kAboutVersionURL[] = "about:version";
@@ -132,6 +134,7 @@ const char kChromeUIRemotingResourcesHost[] = "remotingresources";
const char kChromeUIResourcesHost[] = "resources";
const char kChromeUIScreenshotPath[] = "screenshots";
const char kChromeUISettingsHost[] = "settings";
+const char kChromeUISyncInternalsHost[] = "sync-internals";
const char kChromeUISyncResourcesHost[] = "syncresources";
const char kChromeUITextfieldsHost[] = "textfields";
const char kChromeUIThemePath[] = "theme";
@@ -164,6 +167,8 @@ const char kCloudPrintSetupHost[] = "cloudprintsetup";
const char kNetworkViewInternalsURL[] = "chrome://net-internals/";
const char kNetworkViewCacheURL[] = "chrome://view-http-cache/";
+const char kSyncViewInternalsURL[] = "chrome://sync-internals/";
+
// GPU sub pages
const char kGpuInternalsURL[] = "chrome://gpu-internals/";
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 532f230..145d799 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -57,6 +57,8 @@ extern const char kAboutMemoryURL[];
extern const char kAboutNetInternalsURL[];
extern const char kAboutPluginsURL[];
extern const char kAboutShorthangURL[];
+extern const char kAboutSyncURL[];
+extern const char kAboutSyncInternalsURL[];
extern const char kAboutTermsURL[];
extern const char kAboutVaporwareURL[];
extern const char kAboutVersionURL[];
@@ -123,6 +125,7 @@ extern const char kChromeUIRemotingResourcesHost[];
extern const char kChromeUIResourcesHost[];
extern const char kChromeUIScreenshotPath[];
extern const char kChromeUISettingsHost[];
+extern const char kChromeUISyncInternalsHost[];
extern const char kChromeUISyncResourcesHost[];
extern const char kChromeUITextfieldsHost[];
extern const char kChromeUIThemePath[];
@@ -160,6 +163,9 @@ extern const char kCloudPrintSetupHost[];
extern const char kNetworkViewCacheURL[];
extern const char kNetworkViewInternalsURL[];
+// Sync related URLs.
+extern const char kSyncViewInternalsURL[];
+
// GPU related URLs
extern const char kGpuInternalsURL[];
diff --git a/tools/grit/resource_ids b/tools/grit/resource_ids
index 219e058..2b1fc03 100644
--- a/tools/grit/resource_ids
+++ b/tools/grit/resource_ids
@@ -127,4 +127,7 @@
"chrome/browser/autofill/autofill_resources.grd": {
"messages": [19500],
},
+ "chrome/browser/resources/sync_internals_resources.grd": {
+ "includes": [20000],
+ },
}