| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_message_handler.h" | 5 #include "chrome/browser/ui/webui/sync_internals_message_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 web_ui()->CallJavascriptFunction( | 214 web_ui()->CallJavascriptFunction( |
| 215 "chrome.sync.dispatchEvent", | 215 "chrome.sync.dispatchEvent", |
| 216 base::StringValue("onAboutInfoUpdated"), | 216 base::StringValue("onAboutInfoUpdated"), |
| 217 *value); | 217 *value); |
| 218 } | 218 } |
| 219 | 219 |
| 220 // Gets the ProfileSyncService of the underlying original profile. | 220 // Gets the ProfileSyncService of the underlying original profile. |
| 221 // May return NULL (e.g., if sync is disabled on the command line). | 221 // May return NULL (e.g., if sync is disabled on the command line). |
| 222 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() { | 222 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() { |
| 223 Profile* profile = Profile::FromWebUI(web_ui()); | 223 Profile* profile = Profile::FromWebUI(web_ui()); |
| 224 ProfileSyncServiceFactory* factory = ProfileSyncServiceFactory::GetInstance(); | 224 return ProfileSyncServiceFactory::GetInstance()->GetForProfile( |
| 225 return factory->GetForProfile(profile->GetOriginalProfile()); | 225 profile->GetOriginalProfile()); |
| 226 } | 226 } |
| OLD | NEW |