Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/Plugin.cpp

Issue 10897028: Create a shared dictionary class for plugin and engine (Closed)
Patch Set: Created June 7, 2013, 12:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/Plugin.cpp
===================================================================
--- a/src/plugin/Plugin.cpp
+++ b/src/plugin/Plugin.cpp
@@ -2,27 +2,27 @@
#include "Plugin.h"
#include "../../build/AdblockPlus_i.c"
#include "PluginClass.h"
#include "PluginClient.h"
#include "PluginSystem.h"
#include "PluginSettings.h"
-#include "PluginDictionary.h"
#include "PluginMimeFilterClient.h"
#include "Msiquery.h"
#ifdef SUPPORT_FILTER
#include "PluginFilter.h"
#endif
#ifdef SUPPORT_CONFIG
#include "PluginConfig.h"
#endif
+#include "../shared/Dictionary.h"
CComModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_PluginClass, CPluginClass)
END_OBJECT_MAP()
//Dll Entry Point
@@ -133,19 +133,18 @@ void InitPlugin(bool isInstall)
}
// Create default filters
#ifdef SUPPORT_FILTER
// DEBUG_GENERAL(L"*** Generating default filters")
// CPluginFilter::CreateFilters();
#endif
- // Force creation of default dictionary
- CPluginDictionary* dictionary = CPluginDictionary::GetInstance(true);
- dictionary->Create(true);
+ std::wstring locale((LPCWSTR)CPluginSystem::GetInstance()->GetBrowserLanguage());
+ Dictionary::Create(locale);
Wladimir Palant 2013/06/10 08:45:06 I realized that this isn't the right place to init
// Force creation of default config file
#ifdef SUPPORT_CONFIG
DEBUG_GENERAL("*** Generating config file")
CPluginConfig* config = CPluginConfig::GetInstance();
config->Create(true);
#endif

Powered by Google App Engine
This is Rietveld