| 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 "static_browser_cld_data_provider.h" | 5 #include "components/translate/content/browser/static_browser_cld_data_provider.
h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 #include "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
| 10 | 10 |
| 11 namespace translate { | 11 namespace translate { |
| 12 | 12 |
| 13 // Implementation of the static factory method from BrowserCldDataProvider, | |
| 14 // hooking up this specific implementation for all of Chromium. | |
| 15 BrowserCldDataProvider* CreateBrowserCldDataProviderFor( | |
| 16 content::WebContents* web_contents) { | |
| 17 // This log line is to help with determining which kind of provider has been | |
| 18 // configured. See also: chrome://translate-internals | |
| 19 VLOG(1) << "Creating StaticBrowserCldDataProvider"; | |
| 20 return new StaticBrowserCldDataProvider(); | |
| 21 } | |
| 22 | |
| 23 void SetCldDataFilePath(const base::FilePath& path) { | |
| 24 LOG(WARNING) << "Not supported: SetCldDataFilePath"; | |
| 25 return; | |
| 26 } | |
| 27 | |
| 28 base::FilePath GetCldDataFilePath() { | |
| 29 return base::FilePath(); // empty path | |
| 30 } | |
| 31 | |
| 32 void ConfigureBrowserCldDataProvider(const void* config) { | 13 void ConfigureBrowserCldDataProvider(const void* config) { |
| 33 // No-op: data is statically linked | 14 // No-op: data is statically linked |
| 34 } | 15 } |
| 35 | 16 |
| 36 StaticBrowserCldDataProvider::StaticBrowserCldDataProvider() { | 17 StaticBrowserCldDataProvider::StaticBrowserCldDataProvider() { |
| 37 } | 18 } |
| 38 | 19 |
| 39 StaticBrowserCldDataProvider::~StaticBrowserCldDataProvider() { | 20 StaticBrowserCldDataProvider::~StaticBrowserCldDataProvider() { |
| 40 } | 21 } |
| 41 | 22 |
| 42 bool StaticBrowserCldDataProvider::OnMessageReceived( | 23 bool StaticBrowserCldDataProvider::OnMessageReceived( |
| 43 const IPC::Message& message) { | 24 const IPC::Message& message) { |
| 44 // No-op: data is statically linked | 25 // No-op: data is statically linked |
| 45 return false; | 26 return false; |
| 46 } | 27 } |
| 47 | 28 |
| 48 void StaticBrowserCldDataProvider::OnCldDataRequest() { | 29 void StaticBrowserCldDataProvider::OnCldDataRequest() { |
| 49 // No-op: data is statically linked | 30 // No-op: data is statically linked |
| 50 } | 31 } |
| 51 | 32 |
| 52 void StaticBrowserCldDataProvider::SendCldDataResponse() { | 33 void StaticBrowserCldDataProvider::SendCldDataResponse() { |
| 53 // No-op: data is statically linked | 34 // No-op: data is statically linked |
| 54 } | 35 } |
| 55 | 36 |
| 56 } // namespace translate | 37 } // namespace translate |
| OLD | NEW |