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

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

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 | Annotate | Revision Log
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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/common/url_constants.h" 22 #include "chrome/common/url_constants.h"
23 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
24 #include "content/public/browser/web_ui.h" 24 #include "content/public/browser/web_ui.h"
25 #include "grit/sync_internals_resources.h" 25 #include "grit/sync_internals_resources.h"
26 #include "sync/internal_api/public/util/weak_handle.h" 26 #include "sync/internal_api/public/util/weak_handle.h"
27 #include "sync/js/js_arg_list.h" 27 #include "sync/js/js_arg_list.h"
28 #include "sync/js/js_controller.h" 28 #include "sync/js/js_controller.h"
29 #include "sync/js/js_event_details.h" 29 #include "sync/js/js_event_details.h"
30 #include "ui/base/resource/resource_bundle.h" 30 #include "ui/base/resource/resource_bundle.h"
31 31
32 using csync::JsArgList; 32 using syncer::JsArgList;
33 using csync::JsEventDetails; 33 using syncer::JsEventDetails;
34 using csync::JsReplyHandler; 34 using syncer::JsReplyHandler;
35 using csync::WeakHandle; 35 using syncer::WeakHandle;
36 using content::WebContents; 36 using content::WebContents;
37 37
38 namespace { 38 namespace {
39 39
40 ChromeWebUIDataSource* CreateSyncInternalsHTMLSource() { 40 ChromeWebUIDataSource* CreateSyncInternalsHTMLSource() {
41 ChromeWebUIDataSource* source = 41 ChromeWebUIDataSource* source =
42 new ChromeWebUIDataSource(chrome::kChromeUISyncInternalsHost); 42 new ChromeWebUIDataSource(chrome::kChromeUISyncInternalsHost);
43 43
44 source->set_json_path("strings.js"); 44 source->set_json_path("strings.js");
45 source->add_resource_path("sync_index.js", IDR_SYNC_INTERNALS_INDEX_JS); 45 source->add_resource_path("sync_index.js", IDR_SYNC_INTERNALS_INDEX_JS);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 void SyncInternalsUI::HandleJsReply( 140 void SyncInternalsUI::HandleJsReply(
141 const std::string& name, const JsArgList& args) { 141 const std::string& name, const JsArgList& args) {
142 VLOG(1) << "Handling reply for " << name << " message with args " 142 VLOG(1) << "Handling reply for " << name << " message with args "
143 << args.ToString(); 143 << args.ToString();
144 const std::string& reply_handler = "chrome.sync." + name + ".handleReply"; 144 const std::string& reply_handler = "chrome.sync." + name + ".handleReply";
145 std::vector<const Value*> arg_list(args.Get().begin(), args.Get().end()); 145 std::vector<const Value*> arg_list(args.Get().begin(), args.Get().end());
146 web_ui()->CallJavascriptFunction(reply_handler, arg_list); 146 web_ui()->CallJavascriptFunction(reply_handler, arg_list);
147 } 147 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_internals_ui.h ('k') | chrome/browser/ui/webui/sync_internals_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698