| OLD | NEW |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 source->add_resource_path("sync_search.js", | 51 source->add_resource_path("sync_search.js", |
| 52 IDR_SYNC_INTERNALS_SYNC_SEARCH_JS); | 52 IDR_SYNC_INTERNALS_SYNC_SEARCH_JS); |
| 53 source->add_resource_path("about.js", IDR_SYNC_INTERNALS_ABOUT_JS); | 53 source->add_resource_path("about.js", IDR_SYNC_INTERNALS_ABOUT_JS); |
| 54 source->add_resource_path("data.js", IDR_SYNC_INTERNALS_DATA_JS); | 54 source->add_resource_path("data.js", IDR_SYNC_INTERNALS_DATA_JS); |
| 55 source->add_resource_path("events.js", IDR_SYNC_INTERNALS_EVENTS_JS); | 55 source->add_resource_path("events.js", IDR_SYNC_INTERNALS_EVENTS_JS); |
| 56 source->add_resource_path("notifications.js", | 56 source->add_resource_path("notifications.js", |
| 57 IDR_SYNC_INTERNALS_NOTIFICATIONS_JS); | 57 IDR_SYNC_INTERNALS_NOTIFICATIONS_JS); |
| 58 source->add_resource_path("search.js", IDR_SYNC_INTERNALS_SEARCH_JS); | 58 source->add_resource_path("search.js", IDR_SYNC_INTERNALS_SEARCH_JS); |
| 59 source->add_resource_path("node_browser.js", | 59 source->add_resource_path("node_browser.js", |
| 60 IDR_SYNC_INTERNALS_NODE_BROWSER_JS); | 60 IDR_SYNC_INTERNALS_NODE_BROWSER_JS); |
| 61 source->add_resource_path("traffic.js", |
| 62 IDR_SYNC_INTERNALS_TRAFFIC_JS); |
| 61 source->set_default_resource(IDR_SYNC_INTERNALS_INDEX_HTML); | 63 source->set_default_resource(IDR_SYNC_INTERNALS_INDEX_HTML); |
| 62 return source; | 64 return source; |
| 63 } | 65 } |
| 64 | 66 |
| 65 } // namespace | 67 } // namespace |
| 66 | 68 |
| 67 namespace { | 69 namespace { |
| 68 | 70 |
| 69 // Gets the ProfileSyncService of the underlying original profile. | 71 // Gets the ProfileSyncService of the underlying original profile. |
| 70 // May return NULL (e.g., if sync is disabled on the command line). | 72 // May return NULL (e.g., if sync is disabled on the command line). |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 139 } |
| 138 | 140 |
| 139 void SyncInternalsUI::HandleJsReply( | 141 void SyncInternalsUI::HandleJsReply( |
| 140 const std::string& name, const JsArgList& args) { | 142 const std::string& name, const JsArgList& args) { |
| 141 VLOG(1) << "Handling reply for " << name << " message with args " | 143 VLOG(1) << "Handling reply for " << name << " message with args " |
| 142 << args.ToString(); | 144 << args.ToString(); |
| 143 const std::string& reply_handler = "chrome.sync." + name + ".handleReply"; | 145 const std::string& reply_handler = "chrome.sync." + name + ".handleReply"; |
| 144 std::vector<const Value*> arg_list(args.Get().begin(), args.Get().end()); | 146 std::vector<const Value*> arg_list(args.Get().begin(), args.Get().end()); |
| 145 web_ui()->CallJavascriptFunction(reply_handler, arg_list); | 147 web_ui()->CallJavascriptFunction(reply_handler, arg_list); |
| 146 } | 148 } |
| OLD | NEW |