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

Side by Side Diff: chrome/browser/ui/webui/sync_internals_ui.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 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 unified diff | Download patch
OLDNEW
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/sync_internals_ui.h" 5 #include "chrome/browser/ui/webui/sync_internals_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/sync_internals_message_handler.h" 8 #include "chrome/browser/ui/webui/sync_internals_message_handler.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "components/grit/components_resources.h" 10 #include "components/grit/components_resources.h"
11 #include "components/sync/driver/about_sync_util.h" 11 #include "components/sync/driver/about_sync_util.h"
12 #include "content/public/browser/web_ui.h" 12 #include "content/public/browser/web_ui.h"
13 #include "content/public/browser/web_ui_data_source.h" 13 #include "content/public/browser/web_ui_data_source.h"
14 14
15 namespace { 15 namespace {
16 16
17 content::WebUIDataSource* CreateSyncInternalsHTMLSource() { 17 content::WebUIDataSource* CreateSyncInternalsHTMLSource() {
18 content::WebUIDataSource* source = 18 content::WebUIDataSource* source =
19 content::WebUIDataSource::Create(chrome::kChromeUISyncInternalsHost); 19 content::WebUIDataSource::Create(chrome::kChromeUISyncInternalsHost);
20 20
21 source->SetJsonPath("strings.js"); 21 source->SetJsonPath("strings.js");
22 source->AddResourcePath(sync_driver::sync_ui_util::kSyncIndexJS, 22 source->AddResourcePath(syncer::sync_ui_util::kSyncIndexJS,
23 IDR_SYNC_DRIVER_SYNC_INTERNALS_INDEX_JS); 23 IDR_SYNC_DRIVER_SYNC_INTERNALS_INDEX_JS);
24 source->AddResourcePath(sync_driver::sync_ui_util::kChromeSyncJS, 24 source->AddResourcePath(syncer::sync_ui_util::kChromeSyncJS,
25 IDR_SYNC_DRIVER_SYNC_INTERNALS_CHROME_SYNC_JS); 25 IDR_SYNC_DRIVER_SYNC_INTERNALS_CHROME_SYNC_JS);
26 source->AddResourcePath(sync_driver::sync_ui_util::kTypesJS, 26 source->AddResourcePath(syncer::sync_ui_util::kTypesJS,
27 IDR_SYNC_DRIVER_SYNC_INTERNALS_TYPES_JS); 27 IDR_SYNC_DRIVER_SYNC_INTERNALS_TYPES_JS);
28 source->AddResourcePath(sync_driver::sync_ui_util::kSyncLogJS, 28 source->AddResourcePath(syncer::sync_ui_util::kSyncLogJS,
29 IDR_SYNC_DRIVER_SYNC_INTERNALS_SYNC_LOG_JS); 29 IDR_SYNC_DRIVER_SYNC_INTERNALS_SYNC_LOG_JS);
30 source->AddResourcePath(sync_driver::sync_ui_util::kSyncNodeBrowserJS, 30 source->AddResourcePath(syncer::sync_ui_util::kSyncNodeBrowserJS,
31 IDR_SYNC_DRIVER_SYNC_INTERNALS_SYNC_NODE_BROWSER_JS); 31 IDR_SYNC_DRIVER_SYNC_INTERNALS_SYNC_NODE_BROWSER_JS);
32 source->AddResourcePath(sync_driver::sync_ui_util::kSyncSearchJS, 32 source->AddResourcePath(syncer::sync_ui_util::kSyncSearchJS,
33 IDR_SYNC_DRIVER_SYNC_INTERNALS_SYNC_SEARCH_JS); 33 IDR_SYNC_DRIVER_SYNC_INTERNALS_SYNC_SEARCH_JS);
34 source->AddResourcePath(sync_driver::sync_ui_util::kAboutJS, 34 source->AddResourcePath(syncer::sync_ui_util::kAboutJS,
35 IDR_SYNC_DRIVER_SYNC_INTERNALS_ABOUT_JS); 35 IDR_SYNC_DRIVER_SYNC_INTERNALS_ABOUT_JS);
36 source->AddResourcePath(sync_driver::sync_ui_util::kDataJS, 36 source->AddResourcePath(syncer::sync_ui_util::kDataJS,
37 IDR_SYNC_DRIVER_SYNC_INTERNALS_DATA_JS); 37 IDR_SYNC_DRIVER_SYNC_INTERNALS_DATA_JS);
38 source->AddResourcePath(sync_driver::sync_ui_util::kEventsJS, 38 source->AddResourcePath(syncer::sync_ui_util::kEventsJS,
39 IDR_SYNC_DRIVER_SYNC_INTERNALS_EVENTS_JS); 39 IDR_SYNC_DRIVER_SYNC_INTERNALS_EVENTS_JS);
40 source->AddResourcePath(sync_driver::sync_ui_util::kSearchJS, 40 source->AddResourcePath(syncer::sync_ui_util::kSearchJS,
41 IDR_SYNC_DRIVER_SYNC_INTERNALS_SEARCH_JS); 41 IDR_SYNC_DRIVER_SYNC_INTERNALS_SEARCH_JS);
42 source->SetDefaultResource(IDR_SYNC_DRIVER_SYNC_INTERNALS_INDEX_HTML); 42 source->SetDefaultResource(IDR_SYNC_DRIVER_SYNC_INTERNALS_INDEX_HTML);
43 return source; 43 return source;
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui) 48 SyncInternalsUI::SyncInternalsUI(content::WebUI* web_ui)
49 : WebUIController(web_ui) { 49 : WebUIController(web_ui) {
50 Profile* profile = Profile::FromWebUI(web_ui); 50 Profile* profile = Profile::FromWebUI(web_ui);
51 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource()); 51 content::WebUIDataSource::Add(profile, CreateSyncInternalsHTMLSource());
52 52
53 web_ui->AddMessageHandler(new SyncInternalsMessageHandler); 53 web_ui->AddMessageHandler(new SyncInternalsMessageHandler);
54 } 54 }
55 55
56 SyncInternalsUI::~SyncInternalsUI() {} 56 SyncInternalsUI::~SyncInternalsUI() {}
57 57
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_internals_message_handler_unittest.cc ('k') | components/autofill/core/browser/autofill_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698