summaryrefslogtreecommitdiffstats
path: root/third_party/cld
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 23:16:30 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 23:16:30 +0000
commit65127279b152049393928bf9a520fc26d4ede77d (patch)
treebdfcf1aa1e4f656e946b4b776b16f308f2056c0b /third_party/cld
parent673fd2c0970496cf45b4724510590c9bc2c313bc (diff)
downloadchromium_src-65127279b152049393928bf9a520fc26d4ede77d.zip
chromium_src-65127279b152049393928bf9a520fc26d4ede77d.tar.gz
chromium_src-65127279b152049393928bf9a520fc26d4ede77d.tar.bz2
Clean up third_party/cld.
1. Remove files we don't use that come from toolbar 2. Simplify the directory structure by removing the redundant intermediary directories bar/toolbar/cld/i18n This will bring CLD a step closer to where it can be open-sourced separately (or along with CED for encoding detection.). It's not there yet. In addition to the clean-up, change |LanguageCode*| return 'nb', 'he', 'fil' instead of 'no', 'iw', and 'tl'. Also, use LanguageCodeWithDialects instead of LanguageCode to get 'zh-CN' instead of 'zh'. This is to simplify the 3-way mapping between Chrome's UI locale code, CLD's language code and what's accepted by Google Translate. It's also another preparation for open-sourcing because we'd better use the standard code rather than the obsolete code like 'iw' when open-sourcing. BUG=32759, 33613 TEST=third_party/cld builds on all platforms and pass the following tests: - unit_tests: Extension*.DetectTabLanguage and CompactLangDetTest.* - browser_tests: ExtensionBrowserTest.Toolstrip git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/cld')
-rw-r--r--third_party/cld/bar/common/scopedlibrary.h68
-rw-r--r--third_party/cld/bar/common/scopedptr.h177
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h10
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.cc176
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.h66
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.cc45
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.h33
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicyinterface.h27
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_resourceids.h27
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h10
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h12
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.cc111
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.h75
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_serviceinterface.h51
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.cc189
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h88
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.cc102
-rw-r--r--third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h64
-rw-r--r--third_party/cld/bar/toolbar/option_constants.h282
-rw-r--r--third_party/cld/bar/toolbar/optionsinterface.h206
-rw-r--r--third_party/cld/bar/toolbar/toolbarevents.h153
-rw-r--r--third_party/cld/bar/toolbar/userbroker.h271
-rw-r--r--third_party/cld/cld.gyp122
-rw-r--r--third_party/cld/encodings/compact_lang_det/cldutil.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.cc)18
-rw-r--r--third_party/cld/encodings/compact_lang_det/cldutil.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h)16
-rw-r--r--third_party/cld/encodings/compact_lang_det/cldutil_dbg.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h)16
-rw-r--r--third_party/cld/encodings/compact_lang_det/cldutil_dbg_empty.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg_empty.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/compact_lang_det.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.cc)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/compact_lang_det.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h)10
-rw-r--r--third_party/cld/encodings/compact_lang_det/compact_lang_det_impl.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.cc)34
-rw-r--r--third_party/cld/encodings/compact_lang_det/compact_lang_det_impl.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h)10
-rw-r--r--third_party/cld/encodings/compact_lang_det/compact_lang_det_unittest_small.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_unittest_small.cc)10
-rw-r--r--third_party/cld/encodings/compact_lang_det/ext_lang_enc.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.cc)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/ext_lang_enc.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h)10
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz_0.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz_0.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_0.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_0.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/getonescriptspan.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc)26
-rw-r--r--third_party/cld/encodings/compact_lang_det/getonescriptspan.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h)10
-rw-r--r--third_party/cld/encodings/compact_lang_det/letterscript_enum.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/letterscript_enum.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/subsetsequence.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/subsetsequence.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h)10
-rw-r--r--third_party/cld/encodings/compact_lang_det/subsetsequence_unittest.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence_unittest.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/tote.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/tote.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h)8
-rw-r--r--third_party/cld/encodings/compact_lang_det/unittest_data.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/unittest_data.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/utf8propjustletter.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/utf8propletterscriptnum.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/utf8scannotjustletterspecial.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_basictypes.h10
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_commandlineflags.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_google.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_htmlutils.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_htmlutils_google3.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_google3.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_htmlutils_windows.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_windows.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_logging.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_macros.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_strtoint.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_strtoint.h)8
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h)12
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_unilib.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_unilib_google3.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_google3.cc)0
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_unilib_windows.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_windows.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_utf.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf.h)6
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_utf8statetable.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_utf8statetable.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h)8
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_utf8utils.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h)8
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_utf8utils_google3.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_google3.cc)2
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/cld_utf8utils_windows.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_windows.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/normalizedunicodetext.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.cc)4
-rw-r--r--third_party/cld/encodings/compact_lang_det/win/normalizedunicodetext.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.h)8
-rw-r--r--third_party/cld/encodings/internal/encodings.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/internal/encodings.cc)2
-rw-r--r--third_party/cld/encodings/lang_enc.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/lang_enc.h)10
-rw-r--r--third_party/cld/encodings/proto/encodings.pb.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/proto/encodings.pb.h)6
-rw-r--r--third_party/cld/encodings/public/encodings.h (renamed from third_party/cld/bar/toolbar/cld/i18n/encodings/public/encodings.h)8
-rw-r--r--third_party/cld/languages/internal/languages.cc (renamed from third_party/cld/bar/toolbar/cld/i18n/languages/internal/languages.cc)13
-rw-r--r--third_party/cld/languages/proto/languages.pb.h (renamed from third_party/cld/bar/toolbar/cld/i18n/languages/proto/languages.pb.h)6
-rw-r--r--third_party/cld/languages/public/languages.h (renamed from third_party/cld/bar/toolbar/cld/i18n/languages/public/languages.h)8
85 files changed, 267 insertions, 2517 deletions
diff --git a/third_party/cld/bar/common/scopedlibrary.h b/third_party/cld/bar/common/scopedlibrary.h
deleted file mode 100644
index 0e8ceee..0000000
--- a/third_party/cld/bar/common/scopedlibrary.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_COMMON_SCOPEDLIBRARY_H_
-#define BAR_COMMON_SCOPEDLIBRARY_H_
-
-
-// A scoped object to safely load and free a DLL referenced by name.
-// Provides an access to a handle to loaded library (HMODULE type).
-//
-// Example:
-// ScopedLibrary library(LIBRARY_NAME);
-// ... = ::GetProcAddress(library.handle(), FUNCTION_NAME);
-class ScopedLibrary {
- public:
- // Always creates initialized ScopedLibrary.
- // [in] file_name - library's file name.
- explicit ScopedLibrary(const TCHAR *file_name)
- : library_(::LoadLibrary(file_name)) {}
- // Unloads owned library, if any.
- ~ScopedLibrary() {
- if (library_ != NULL)
- ::FreeLibrary(library_);
- }
- inline HMODULE handle() const { return library_; }
- // Returns true if library was loaded successfully.
- bool IsValid() const { return library_ != NULL; }
-
- private:
- // Handle to loaded library.
- const HMODULE library_;
- DISALLOW_COPY_AND_ASSIGN(ScopedLibrary);
-};
-
-
-// A class representing a pointer to a function retrieved from DLL.
-// FunctionPrototype is a regular C-style pointer-to-function type
-// definition. For example, type of WinAPI IsValidSid function:
-// BOOL (WINAPI*)(PSID)
-//
-// Example:
-// FunctionFromDll<BOOL (WINAPI*)(PSID)> is_valid_sid;
-// ... = is_valid_sid.function()(...);
-template<typename FunctionPrototype>
-class FunctionFromDll {
- public:
- FunctionFromDll() : function_(NULL) {}
- // Binds this object to a function from DLL.
- // [in] library - handle to a library containing a function.
- // Must not be NULL.
- // [in] name - name of the function.
- void Bind(HMODULE library, const char *name) {
- function_ =
- reinterpret_cast<FunctionPrototype>(::GetProcAddress(library, name));
- }
- inline FunctionPrototype function() const { return function_; }
- // Returns true if function was bound successfully.
- bool IsValid() const { return function_ != NULL; }
-
- private:
- // Pointer to the function.
- FunctionPrototype function_;
- DISALLOW_COPY_AND_ASSIGN(FunctionFromDll);
-};
-
-
-#endif // BAR_COMMON_SCOPEDLIBRARY_H_
diff --git a/third_party/cld/bar/common/scopedptr.h b/third_party/cld/bar/common/scopedptr.h
deleted file mode 100644
index 8136615..0000000
--- a/third_party/cld/bar/common/scopedptr.h
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_COMMON_SCOPEDPTR_H_
-#define BAR_COMMON_SCOPEDPTR_H_
-
-#include <wininet.h>
-
-// Boxer for dumb types, allows you to associate cleanup code when the object
-// falls off the stack. Destructor implementation must be provided for each
-// type.
-template < class T >
-class ScopedObject {
- public:
- explicit ScopedObject(const T& v) : v_(v) { }
- ~ScopedObject();
-
- operator T() const { return v_; }
- T get() const { return v_; }
-
- private:
- T v_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedObject);
-};
-
-// A scoped object for the various HANDLE- and LPVOID-based types.
-// destroy() implementation must be provided for each type.
-// Added by Breen Hagan of Google.
-template < class T, int DIFFERENTIATOR >
-class ScopedHandle {
- public:
- explicit ScopedHandle(const T& v) : v_(v) {}
- ~ScopedHandle() {
- destroy();
- }
-
- operator T() const { return v_; }
- T get() const { return v_; }
-
- void reset(const T& v) {
- if (v_ != v) {
- destroy();
- v_ = v;
- }
- }
-
- // Swap two scoped handlers.
- void swap(ScopedHandle& h2) {
- T tmp = v_;
- v_ = h2.v_;
- h2.v_ = tmp;
- }
-
- T release() {
- T released_value(v_);
- v_ = 0;
- return released_value;
- }
-
- private:
- void destroy();
-
- T v_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedHandle);
-};
-
-// Free functions.
-template <class T, int DIFFERENTIATOR>
-inline void swap(ScopedHandle<T, DIFFERENTIATOR>& h1,
- ScopedHandle<T, DIFFERENTIATOR>& h2) {
- h1.swap(h2);
-}
-
-
-// Uses ScopedHandle to automatically call CloseHandle().
-typedef ScopedHandle< HANDLE, 1 > SAFE_HANDLE;
-
-template <>
-inline void ScopedHandle< HANDLE, 1 >::destroy() {
- if (v_)
- ::CloseHandle(v_);
-}
-
-// Uses ScopedHandle to automatically call CryptReleaseContext().
-typedef ScopedHandle< HCRYPTPROV, 2 > SAFE_HCRYPTPROV;
-
-template <>
-inline void ScopedHandle< HCRYPTPROV, 2 >::destroy() {
- if (v_)
- ::CryptReleaseContext(v_, 0);
-}
-
-// Uses ScopedHandle to automatically call CryptDestroyKey().
-typedef ScopedHandle< HCRYPTKEY, 3 > SAFE_HCRYPTKEY;
-
-template <>
-inline void ScopedHandle< HCRYPTKEY, 3 >::destroy() {
- if (v_)
- ::CryptDestroyKey(v_);
-}
-
-// Uses ScopedHandle to automatically call CryptDestroyHash().
-typedef ScopedHandle< HCRYPTHASH, 4 > SAFE_HCRYPTHASH;
-
-template <>
-inline void ScopedHandle< HCRYPTHASH, 4 >::destroy() {
- if (v_)
- ::CryptDestroyHash(v_);
-}
-
-// Uses ScopedHandle to automatically call UnmapViewOfFile().
-typedef ScopedHandle< LPVOID, 5 > SAFE_MAPPEDVIEW;
-
-template <>
-inline void ScopedHandle< LPVOID, 5 >::destroy() {
- if (v_)
- ::UnmapViewOfFile(v_);
-}
-
-// SAFE_HINTERNET
-// Uses ScopedHandle to automatically call InternetCloseHandle().
-typedef ScopedHandle< HINTERNET, 6 > SAFE_HINTERNET;
-
-template <>
-inline void ScopedHandle< HINTERNET, 6 >::destroy() {
- if (v_)
- ::InternetCloseHandle(v_);
-}
-
-// SAFE_HMODULE
-// Uses ScopedHandle to automatically call ::FreeLibrary().
-typedef ScopedHandle< HMODULE, 7 > SAFE_HMODULE;
-
-template <>
-inline void ScopedHandle< HMODULE, 7 >::destroy() {
- if (v_)
- ::FreeLibrary(v_);
-}
-
-// SAFE_RESOURCE
-// Uses ScopedHandle to automatically call ::FreeResource().
-// The type is HGLOBAL for backward compatibility, see MSDN, LoadResource()
-// function for details.
-typedef ScopedHandle< HGLOBAL, 8 > SAFE_RESOURCE;
-
-template <>
-inline void ScopedHandle< HGLOBAL, 8 >::destroy() {
- if (v_)
- ::FreeResource(v_);
-}
-
-
-// ScopedIntCounter is a class that will increment given integet on construction
-// and decrement it when the class is destructed.
-class ScopedIntCounter {
- public:
- ScopedIntCounter(int *counter):
- counter_(counter) {
- (*counter_)++;
- }
-
- ~ScopedIntCounter() {
- (*counter_)--;
- }
-
- int count() {
- return *counter_;
- }
-
- private:
- int* counter_;
-};
-
-#endif // BAR_COMMON_SCOPEDPTR_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h
deleted file mode 100644
index 9f79857..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_BASICTYPES_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_BASICTYPES_H_
-
-#include "base/basictypes.h"
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_BASICTYPES_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.cc b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.cc
deleted file mode 100644
index ffa4637a..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.cc
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.h"
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h"
-
-
-// External declarations for CLD table descriptions we're replacing with
-// data loaded from the resource DLL. Required here to get access to default
-// values.
-extern const UTF8PropObj compact_lang_det_generated_ctjkvz_b1_obj;
-extern const cld::CLDTableSummary kQuadTable_obj;
-
-
-// CldDynamicState::CldStructures.
-
-struct CldDynamicState::CldStructures {
- // Creates an empty instance. Due to the lack of default constructors for
- // CLD structures, use their current values as a initial ones and then
- // zero them out to avoid the temptation to use this side effect later.
- CldStructures()
- : ctjkvz(compact_lang_det_generated_ctjkvz_b1_obj),
- quads(kQuadTable_obj) {
- memset(&ctjkvz, 0, sizeof(ctjkvz));
- memset(&quads, 0, sizeof(quads));
- detection_tables.quadgram_obj = &quads;
- detection_tables.unigram_obj = &ctjkvz;
- }
- // Shallow copy of CLD data structures.
- void ShallowCopyFrom(const cld::CLDTableSummary& quads_to_copy,
- const UTF8StateMachineObj& ctjkvz_to_copy) {
- memcpy(&quads, &quads_to_copy, sizeof(quads));
- memcpy(&ctjkvz, &ctjkvz_to_copy, sizeof(ctjkvz));
- }
-
- // Descriptions for internal CLD tables.
- cld::CLDTableSummary quads;
- UTF8StateMachineObj ctjkvz;
- // Cached pointers to the structures above, see
- // CldDynamicState::detection_tables().
- CompactLangDet::DetectionTables detection_tables;
-
- DISALLOW_COPY_AND_ASSIGN(CldStructures);
-};
-
-
-// CldDynamicState::State.
-
-struct CldDynamicState::State {
- State() {}
-
- // Loaded CLD data tables.
- scoped_ptr<CldTables> tables;
-
- // New CLD internal structures pointing to the loaded CLD data tables.
- CldStructures cld_structures;
-
- DISALLOW_COPY_AND_ASSIGN(State);
-};
-
-
-// CldDynamicState.
-
-CldDynamicState::CldDynamicState() {
-}
-
-CldDynamicState::~CldDynamicState() {
- Unload();
-}
-
-
-DWORD CldDynamicState::Load(CldTables* tables) {
- _ASSERT(tables);
- if (!tables)
- return ERROR_INVALID_PARAMETER;
- // First thing, assume tables ownership to do not leak it in case of error.
- scoped_ptr<CldTables> new_tables(tables);
-
- // Save current CLD internal data structures.
- scoped_ptr<State> new_state(new State);
- if (!new_state.get())
- return ERROR_OUTOFMEMORY;
-
- // Transfer tables ownership to new_state.
- swap(new_state->tables, new_tables);
-
- // Create new CLD internal data structures.
- RETURN_IF_ERROR(
- CreateCldStructures(*new_state->tables, &new_state->cld_structures));
-
- // Safely put new state in place.
- swap(state_, new_state);
- return 0;
-}
-
-
-bool CldDynamicState::IsLoaded() const {
- return state_.get();
-}
-
-
-void CldDynamicState::Unload() {
- state_.reset();
-}
-
-
-const CompactLangDet::DetectionTables*
- CldDynamicState::detection_tables() const {
- if (!state_.get())
- return NULL;
- return &state_->cld_structures.detection_tables;
-}
-
-
-DWORD CldDynamicState::CreateCldStructures(
- const CldTables& tables, CldStructures* cld_structures) const {
- _ASSERT(cld_structures);
- if (!cld_structures)
- return ERROR_INVALID_PARAMETER;
-
- // Get access to the tables.
- const ResourceInMemory* quads = tables.get_table(CldTables::TABLE_QUADS);
- const ResourceInMemory* indirect =
- tables.get_table(CldTables::TABLE_INDIRECT);
- const ResourceInMemory* ctjkvz = tables.get_table(CldTables::TABLE_CTJKVZ);
-
- if (!quads || !indirect || !ctjkvz)
- return ERROR_INVALID_DATA;
-
- // Check if loaded data is of the valid size.
- if (0 != quads->size() % sizeof(cld_structures->quads.kCLDTable[0]))
- return ERROR_INVALID_DATA;
- if (0 != indirect->size() % sizeof(cld_structures->quads.kCLDTableInd[0]))
- return ERROR_INVALID_DATA;
-
- // This is our new quads table description.
- cld::CLDTableSummary new_quads = {
- reinterpret_cast<const cld::IndirectProbBucket4*>(
- quads->data()), // kCLDTable
- reinterpret_cast<const uint32*>(
- indirect->data()), // kCLDTableInd
- quads->size() / sizeof(cld::IndirectProbBucket4), // kCLDTableSize
- indirect->size() /
- sizeof(cld_structures->quads.kCLDTableInd[0]), // kCLDTableIndSize
- tables.get_parameter(CldTables::QUADS_KEY_MASK), // kCLDTableKeyMask
- tables.get_parameter(CldTables::QUADS_BUILD_DATE), // kCLDTableBuildDate
- };
-
- // This is our new ctjkvz table description.
- UTF8StateMachineObj new_ctjkvz = {
- tables.get_parameter(CldTables::CTJKVZ_STATE0), // state0
- tables.get_parameter(CldTables::CTJKVZ_STATE0_SIZE), // state0_size
- ctjkvz->size(), // total_size
- tables.get_parameter(CldTables::CTJKVZ_MAX_EXPAND_X4), // max_expand
- tables.get_parameter(CldTables::CTJKVZ_SHIFT), // entry_shift
- tables.get_parameter(CldTables::CTJKVZ_BYTES), // bytes_per_entry
- tables.get_parameter(CldTables::CTJKVZ_LOSUB), // losub
- tables.get_parameter(CldTables::CTJKVZ_HIADD), // hiadd
- reinterpret_cast<const uint8*>(ctjkvz->data()), // state_table
- compact_lang_det_generated_ctjkvz_b1_obj.remap_base, // remap_base
- compact_lang_det_generated_ctjkvz_b1_obj.remap_string, // remap_string
- compact_lang_det_generated_ctjkvz_b1_obj.fast_state, // fast_state
- };
-
- // Set up new CldStructures instance.
- cld_structures->ShallowCopyFrom(new_quads, new_ctjkvz);
- return 0;
-}
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.h
deleted file mode 100644
index 7dba48f..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_DYNAMICSTATE_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_DYNAMICSTATE_H_
-
-#include <tchar.h>
-#include <windows.h>
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
-
-
-class CldTables;
-
-namespace CompactLangDet {
- struct DetectionTables;
-} // namespace CompactLangDet
-
-
-// Loads CLD tables and and sets up CLD internal structures to use the loaded
-// tables instead of built-in ones.
-class CldDynamicState {
- public:
- // Creates an empty CldDynamicState instance. All setup is done in Load().
- CldDynamicState();
- // Clears everything, no need to explicitly call Unload().
- ~CldDynamicState();
-
- // Loads all CLD tables and parameters from the resource DLL and replaces
- // CLD table descriptions with the ones pointing to the loaded data.
- // [in] tables - loaded CLD data. Takes an ownership of tables.
- // Must not be NULL.
- // Returns: 0 in case of success, Windows GetLastError() code otherwise.
- DWORD Load(CldTables* tables);
- // Returns true if it is loaded successfully.
- bool IsLoaded() const;
- // Unloads all resources and resource DLL and reverts CLD data description
- // to the original ones.
- void Unload();
-
- // Returns a pointer to structure encapsulating CLD data tables required for
- // language detection. Returned pointer is guaranteed to be valid until
- // state is unloaded. Returns NULL if state is not loaded.
- const CompactLangDet::DetectionTables* detection_tables() const;
-
- private:
- // Forward declaration for CldDynamicState internal state types.
- struct CldStructures;
- struct State;
-
- // Prepares new data for CLD internal structures based on current state.
- // [in] tables - loaded CLD data tables.
- // [out] cld_structures - place to put new data in.
- DWORD CreateCldStructures(const CldTables& tables,
- CldStructures* cld_structures) const;
-
- // Internal state, holds all loaded data and owns tables.
- scoped_ptr<State> state_;
-
- DISALLOW_COPY_AND_ASSIGN(CldDynamicState);
-};
-
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_DYNAMICSTATE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.cc b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.cc
deleted file mode 100644
index c4ace6f..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.h"
-
-#include <atlstr.h>
-using ATL::CString;
-#include <tchar.h>
-#include <windows.h>
-
-#include <vector> // to compile bar/common/component.h
-
-#include "bar/common/component.h"
-#include "bar/common/execute/execute_utils.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_serviceinterface.h"
-
-// TODO(jcampan): implement when needed.
-static bool UseComponent(const TCHAR* component_name, CString* component_path) {
- return false;
-}
-
-CldLoadPolicy::CldLoadPolicy() {
-}
-
-CldLoadPolicy::~CldLoadPolicy() {
-}
-
-
-DWORD CldLoadPolicy::Ready(CldServiceInterface* cld_service) {
- _ASSERT(NULL != cld_service);
- if (NULL == cld_service)
- return ERROR_INVALID_PARAMETER;
-
- if (cld_service->IsLoaded())
- return ERROR_SUCCESS;
-
- // Retrieve fully specified file name for the resource DLL and verifies that
- // this DLL is properly signed by Google.
- CString component_file_name;
- if (!UseComponent(kCLDTablesDllName, &component_file_name))
- return ERROR_FILE_NOT_FOUND;
-
- return cld_service->Load(component_file_name);
-}
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.h
deleted file mode 100644
index e20e9c1..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOADPOLICY_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOADPOLICY_H_
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicyinterface.h"
-
-
-// Default implementation of CldService loading policy. Instance
-// of this class is passed as a parameter to CldService constructor
-// (CldService instance assumes its ownership). It's not intended to be used
-// in any other way.
-// It is not thread safe. Calling Ready() simultaneously from different threads
-// will yield unpredictable results.
-class CldLoadPolicy : public CldLoadPolicyInterface {
- public:
- // Creates an empty CldLoadPolicy instance.
- CldLoadPolicy();
- virtual ~CldLoadPolicy();
-
- // CldLoadPolicyInterface implementation.
- virtual DWORD Ready(CldServiceInterface* cld_service);
-
- private:
- // DISALLOW_COPY_AND_ASSIGN(CldLoadPolicy) equivalent.
- CldLoadPolicy(const CldLoadPolicy&);
- CldLoadPolicy& operator=(const CldLoadPolicy&);
-};
-
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOADPOLICY_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicyinterface.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicyinterface.h
deleted file mode 100644
index 7f0d622..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicyinterface.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOADPOLICYINTERFACE_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOADPOLICYINTERFACE_H_
-
-#include <windows.h>
-
-class CldServiceInterface;
-
-// Loading policy for the object implementing CldServiceInterface.
-// Checks if the corresponding component is present and valid, calls
-// cld_service Load() function with the actual component file name.
-class CldLoadPolicyInterface {
- public:
- virtual ~CldLoadPolicyInterface() {}
-
- // Loads cld_service if necessary. Does nothing and returns success code
- // (ERROR_SUCCESS) if cld_service is already loaded.
- // [in] cld_service - instance to verify loaded status. Must not be NULL.
- // Returns ERROR_SUCCESS if cld_service was loaded successfully, Windows
- // error code otherwise.
- virtual DWORD Ready(CldServiceInterface* cld_service) = 0;
-};
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOADPOLICYINTERFACE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_resourceids.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_resourceids.h
deleted file mode 100644
index 13d5664..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_resourceids.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_RESOURCEIDS_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_RESOURCEIDS_H_
-
-#include <tchar.h>
-
-
-#define IDR_CLD_TABLE_QUADS _T("QUAD")
-#define IDR_CLD_TABLE_INDIRECT _T("INDR")
-#define IDR_CLD_TABLE_CTJKVZ _T("CTJK")
-
-#define IDR_CLD_QUAD_TABLE_KEY_MASK _T("KMSK")
-#define IDR_CLD_QUAD_TABLE_BUILD_DATE _T("BDDT")
-
-#define IDR_CLD_CTJKVZ_TABLE_STATE0 _T("STT0")
-#define IDR_CLD_CTJKVZ_TABLE_STATE0_SIZE _T("ST0S")
-#define IDR_CLD_CTJKVZ_TABLE_MAX_EXPAND_X4 _T("MXEX")
-#define IDR_CLD_CTJKVZ_TABLE_SHIFT _T("TSFT")
-#define IDR_CLD_CTJKVZ_TABLE_BYTES _T("TBTS")
-#define IDR_CLD_CTJKVZ_TABLE_LOSUB _T("LOSB")
-#define IDR_CLD_CTJKVZ_TABLE_HIADD _T("HIAD")
-
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_RESOURCEIDS_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h
deleted file mode 100644
index 7fd9f02..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SCOPED_PTR_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SCOPED_PTR_H_
-
-#include "base/scoped_ptr.h"
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SCOPED_PTR_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h
deleted file mode 100644
index 650e578..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SCOPEDPTR_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SCOPEDPTR_H_
-
-// This include has to be out of order to compile common/scopedptr.h
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h"
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SCOPEDPTR_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.cc b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.cc
deleted file mode 100644
index 561be68..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.cc
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.h"
-
-#include <atlbase.h>
-#include <atlcore.h>
-#include <tchar.h>
-#include <windows.h>
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicyinterface.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h"
-
-using ATL::CComCriticalSection;
-using ATL::CComCritSecLock;
-
-CldService::CldService(CldLoadPolicyInterface* load_policy)
- : load_policy_(load_policy) {
-}
-
-CldService::~CldService() {
- Unload();
-}
-
-
-DWORD CldService::Load(const TCHAR* component_file_name) {
- CComCritSecLock<CComCriticalSection> lock(guard_);
- return LoadState(component_file_name, &state_);
-}
-
-
-DWORD CldService::LoadState(const TCHAR* component_file_name,
- scoped_ptr<CldDynamicState>* state) const {
- _ASSERT(state);
- if (!state)
- return ERROR_INVALID_PARAMETER;
-
- // Load resource DLL.
- SAFE_HMODULE resource_library(
- ::LoadLibraryEx(component_file_name, NULL, LOAD_LIBRARY_AS_DATAFILE));
- if (!resource_library.get())
- return ::GetLastError();
-
- // Load resources.
- scoped_ptr<CldTables> tables(new CldTables);
- if (!tables.get())
- return ERROR_OUTOFMEMORY;
-
- RETURN_IF_ERROR(
- tables->Load(resource_library.release()));
-
- // Set up CLD library.
- scoped_ptr<CldDynamicState> new_state(new CldDynamicState);
- if (!new_state.get())
- return ERROR_OUTOFMEMORY;
-
- // Pass tables's ownership to new_state.
- RETURN_IF_ERROR(
- new_state->Load(tables.release()));
-
- // Put new state in place. Note that CldDynamicState manipulates global
- // memory and does not fully encapsulate the state.
- swap(*state, new_state);
-
- return ERROR_SUCCESS;
-}
-
-
-bool CldService::IsLoaded() const {
- CComCritSecLock<CComCriticalSection> lock(guard_);
- return NULL != state_.get();
-}
-
-
-void CldService::Unload() {
- CComCritSecLock<CComCriticalSection> lock(guard_);
- state_.reset();
-}
-
-
-const char* CldService::DetectLanguage(const WCHAR* text, bool is_plain_text,
- bool* is_reliable, int* num_languages,
- DWORD* error_code) {
- CComCritSecLock<CComCriticalSection> lock(guard_);
- Language language = NUM_LANGUAGES;
-
- bool ready = IsLoaded();
- if (!ready) {
- // Try to load CLD tables; do not complain to user if something goes wrong.
- // Worst that could happen is that automatic translation won't kick in,
- // but user can still explicitly request a translation.
- ready = NULL != load_policy_.get() &&
- ERROR_SUCCESS == load_policy_->Ready(this);
- }
-
- if (ready) {
- language = DetectLanguageOfUnicodeText(state_->detection_tables(),
- text, is_plain_text, is_reliable,
- num_languages, error_code);
- }
-
- // Use LanguageCodeWithDialects() instead of LanguageCode() to properly handle
- // Chinese return variations, i.e. return "zh-CN" or "zh-TW", not just "zh".
- return LanguageCodeWithDialects(language);
-}
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.h
deleted file mode 100644
index a0e8537..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SERVICE_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SERVICE_H_
-
-#include <atlcore.h>
-#include <tchar.h>
-#include <windows.h>
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_serviceinterface.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h"
-
-
-class CldDynamicState;
-class CldLoadPolicyInterface;
-
-
-// Provides an access to Compact language Detection library functionality.
-// Usage:
-// CldService instance(new CldLoadPolicy);
-// ...
-// const char* language = instance.DetectLanguage(...);
-// ...
-// instance.Unload(); or just let the instance's destructor to do the job.
-//
-// Calling DetectLanguage for unsuccessfully loaded instance won't crash or
-// report an error, it will just return the invalid language code (see comment
-// for DetectLanguage function below).
-// It is thread safe.
-class CldService : public CldServiceInterface {
- public:
- // Creates an empty CldService instance. One should call Load() before
- // calling DetectLanguage().
- // [in] load_policy - component loading policy. Pass NULL if loading policy
- // is managed externally. Takes an ownership of load_policy.
- explicit CldService(CldLoadPolicyInterface* load_policy);
- // Clears everything, no need to call Unload() explicitly.
- virtual ~CldService();
-
- // CldServiceInterface implemenation.
-
- // Usually called by load_policy.
- virtual DWORD Load(const TCHAR* component_file_name);
- virtual bool IsLoaded() const;
- virtual void Unload();
-
- virtual const char* DetectLanguage(const WCHAR* text, bool is_plain_text,
- bool* is_reliable, int* num_languages,
- DWORD* error_code);
-
- private:
- // Loads a new copy of data from the specified DLL.
- // [in] component_file_name - file name of the DLL with CLD resources.
- // [out] state - receives a new copy of data.
- // Returns: 0 in case of success, Windows GetLastError() code otherwise.
- DWORD LoadState(const TCHAR* component_file_name,
- scoped_ptr<CldDynamicState>* state) const;
-
- // CLD loading policy.
- scoped_ptr<CldLoadPolicyInterface> load_policy_;
- // Loaded CLD resources and internal data structures.
- scoped_ptr<CldDynamicState> state_;
- // Critical section to protect threaded access.
- mutable ATL::CComAutoCriticalSection guard_;
-
-
- // DISALLOW_COPY_AND_ASSIGN(CldService) equivalent.
- CldService(const CldService&);
- CldService& operator=(const CldService&);
-};
-
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SERVICE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_serviceinterface.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_serviceinterface.h
deleted file mode 100644
index f47adda..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_serviceinterface.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SERVICEINTERFACE_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SERVICEINTERFACE_H_
-
-#include <tchar.h>
-#include <windows.h>
-#include <bar/common/refobject.h>
-
-// Abstract interface for Compact language Detection library functionality.
-class CldServiceInterface : public RefObject {
- public:
- // Clears everything, no need to call Unload() explicitly.
- virtual ~CldServiceInterface() {}
-
- // Loads CLD resources and modifies CLD internal data structures to use
- // loaded tables and parameters.
- // Call this function before trying to detect a language. DetectLanguage()
- // will return " invalid_language_code" if Load() was not called at all
- // or failed for some reason.
- virtual DWORD Load(const TCHAR* component_file_name) = 0;
- // Returns true if it was loaded successfully.
- virtual bool IsLoaded() const = 0;
- // Unloads all CLD resources and reverts CLD internal data structures to
- // the default state (in which it is not capable to detect any language).
- virtual void Unload() = 0;
-
- // Detects a language of the UTF-16 encoded zero-terminated text.
- // [in] text - UTF-16 encoded text to detect a language of.
- // [in] is_plain_text - true if plain text, false otherwise (e.g. HTML).
- // [out] is_reliable - true, if returned language was detected reliably.
- // See compact_lang_det.h for details.
- // [out] num_languages - set to the number of languages detected on the page.
- // Language counts only if it's detected in more than 20% of the text.
- // [out, optional] error_code - set to 0 in case of success, Windows
- // GetLastError() code otherwise. Pass NULL, if not interested in errors.
- // See bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h,
- // CompactLangDet::DetectLanguage() description for other input parameters
- // description.
- // Returns: ISO-639-1 code for the language.
- // Returns " invalid_language_code" in case of any error.
- // See googleclient/bar/toolbar/cld/i18n/languages/internal/languages.cc
- // for details.
- virtual const char* DetectLanguage(const WCHAR* text, bool is_plain_text,
- bool* is_reliable, int* num_languages,
- DWORD* error_code) = 0;
-};
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_SERVICEINTERFACE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.cc b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.cc
deleted file mode 100644
index 22ade3e..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h"
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_resourceids.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h"
-
-
-// CldTables::State.
-
-struct CldTables::State {
- State()
- : resources(0) {
- }
-
- const ResourceInMemory* get_table(TableIndex i) const {
- if (NULL != tables.get() && 0 <= i && i < TABLE_COUNT)
- return &tables[i];
- _ASSERT(0);
- return NULL;
- }
-
- const DWORD get_parameter(ParameterIndex i) const {
- if (NULL != parameters.get() && 0 <= i && i < PARAMETER_COUNT)
- return parameters[i];
- _ASSERT(0);
- return 0;
- }
-
- // Loaded resource DLL.
- SAFE_HMODULE resources;
- // Big CLD tables.
- scoped_array<ResourceInMemory> tables;
- // Table parameters.
- scoped_array<DWORD> parameters;
-
- DISALLOW_COPY_AND_ASSIGN(State);
-};
-
-
-// CldTables.
-
-CldTables::CldTables() {
-}
-
-CldTables::~CldTables() {
- Unload();
-}
-
-
-DWORD CldTables::Load(HMODULE resource_library) {
- // First thing, assume the ownership of the resource_library to do not leak it
- // in case of failure.
- SAFE_HMODULE owned_resource_library(resource_library);
-
- return LoadState(&owned_resource_library, &state_);
-}
-
-
-bool CldTables::IsLoaded() const {
- return NULL != state_.get();
-}
-
-
-void CldTables::Unload() {
- state_.reset();
-}
-
-
-const ResourceInMemory* CldTables::get_table(TableIndex i) const {
- _ASSERT(state_.get());
- if (!state_.get())
- return NULL;
- return state_->get_table(i);
-}
-
-const DWORD CldTables::get_parameter(ParameterIndex i) const {
- _ASSERT(state_.get());
- if (!state_.get())
- return 0;
- return state_->get_parameter(i);
-}
-
-
-DWORD CldTables::LoadState(SAFE_HMODULE* resource_library,
- scoped_ptr<State>* state) const {
- _ASSERT(resource_library);
- _ASSERT(state);
- if (!resource_library || !state)
- return ERROR_INVALID_PARAMETER;
-
- // Allocate a new state.
- scoped_ptr<State> new_state(new State);
- if (!new_state.get())
- return ERROR_OUTOFMEMORY;
-
- // Transfer resource_library ownership to new_state.
- swap(new_state->resources, *resource_library);
-
- // Load data from resources.
- RETURN_IF_ERROR(
- LoadTables(new_state->resources.get(), &new_state->tables));
-
- RETURN_IF_ERROR(
- LoadParameters(new_state->resources.get(), &new_state->parameters));
-
- // Safely put new state in place.
- swap(*state, new_state);
- return 0;
-}
-
-
-DWORD CldTables::LoadTables(HMODULE resource_library,
- scoped_array<ResourceInMemory>* tables) const {
- _ASSERT(tables);
- if (!tables)
- return ERROR_INVALID_PARAMETER;
-
- // Mapping from the table index to the corresponding resource identifier.
- static const TCHAR* resource_ids[] = {
- IDR_CLD_TABLE_QUADS,
- IDR_CLD_TABLE_INDIRECT,
- IDR_CLD_TABLE_CTJKVZ,
- };
- COMPILE_ASSERT(arraysize(resource_ids) == TABLE_COUNT, k_table_index_changed);
-
- // Allocate a new copy of tables.
- scoped_array<ResourceInMemory> new_tables(
- new ResourceInMemory[arraysize(resource_ids)]);
- if (!new_tables.get())
- return ERROR_OUTOFMEMORY;
-
- // Load tables one by one.
- for (size_t i = 0; i < arraysize(resource_ids); ++i) {
- RETURN_IF_ERROR(
- new_tables[i].Load(resource_library, resource_ids[i], RT_RCDATA));
- }
-
- // Safely put new tables in place.
- swap(*tables, new_tables);
- return 0;
-}
-
-
-DWORD CldTables::LoadParameters(HMODULE resource_library,
- scoped_array<DWORD>* parameters) const {
- _ASSERT(parameters);
- if (!parameters)
- return ERROR_INVALID_PARAMETER;
-
- // Mapping from the parameter index to the corresponding resource identifier.
- static const TCHAR* resource_ids[] = {
- IDR_CLD_QUAD_TABLE_KEY_MASK,
- IDR_CLD_QUAD_TABLE_BUILD_DATE,
- IDR_CLD_CTJKVZ_TABLE_STATE0,
- IDR_CLD_CTJKVZ_TABLE_STATE0_SIZE,
- IDR_CLD_CTJKVZ_TABLE_MAX_EXPAND_X4,
- IDR_CLD_CTJKVZ_TABLE_SHIFT,
- IDR_CLD_CTJKVZ_TABLE_BYTES,
- IDR_CLD_CTJKVZ_TABLE_LOSUB,
- IDR_CLD_CTJKVZ_TABLE_HIADD,
- };
- COMPILE_ASSERT(arraysize(resource_ids) == PARAMETER_COUNT,
- k_table_parameter_index_changed);
-
- // Allocate a new copy of parameters.
- scoped_array<DWORD> new_parameters(new DWORD[arraysize(resource_ids)]);
- if (!new_parameters.get())
- return ERROR_OUTOFMEMORY;
-
- // Load parameters one by one.
- for (size_t i = 0; i < arraysize(resource_ids); ++i) {
- ResourceInMemory resource;
- RETURN_IF_ERROR(
- resource.Load(resource_library, resource_ids[i], RT_RCDATA));
- if (resource.size() != sizeof(DWORD))
- return ERROR_INVALID_DATA;
-
- new_parameters[i] = *reinterpret_cast<DWORD*>(resource.data());
- }
-
- // Safely put new parameters in place.
- swap(*parameters, new_parameters);
- return 0;
-}
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h
deleted file mode 100644
index 71f657c..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_TABLES_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_TABLES_H_
-
-#include <tchar.h>
-#include <windows.h>
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
-
-
-class ResourceInMemory;
-
-
-class CldTables {
- public:
- // List of CLD tables to load from resources.
- typedef enum {
- TABLE_QUADS,
- TABLE_INDIRECT,
- TABLE_CTJKVZ,
- TABLE_COUNT,
- } TableIndex;
- // List of CLD parameters to load from resources.
- typedef enum {
- QUADS_KEY_MASK,
- QUADS_BUILD_DATE,
- CTJKVZ_STATE0,
- CTJKVZ_STATE0_SIZE,
- CTJKVZ_MAX_EXPAND_X4,
- CTJKVZ_SHIFT,
- CTJKVZ_BYTES,
- CTJKVZ_LOSUB,
- CTJKVZ_HIADD,
- PARAMETER_COUNT,
- } ParameterIndex;
-
- // Creates an empty CldTables instance. All setup is done in Load().
- CldTables();
- // Clears everything, no need to explicitly call Unload().
- ~CldTables();
-
- // Loads all CLD tables and parameters from the resource DLL and replaces
- // CLD table descriptions with the ones pointing to the loaded data.
- // [in] resource_library - library to load resources from.
- // Takes ownership of this library and will unload it in Unload().
- // Returns: 0 in case of success, Windows GetLastError() code otherwise.
- // Does not unload current state in case of failure.
- DWORD Load(HMODULE resource_library);
- // Returns true if it is loaded successfully.
- bool IsLoaded() const;
- // Unloads all resources and resource DLL.
- void Unload();
-
- const ResourceInMemory* get_table(TableIndex i) const;
- const DWORD get_parameter(ParameterIndex i) const;
-
- private:
- // Forward declaration for CldTables internal state type.
- struct State;
-
- // Does the actual resource loading.
- // [in] resource_library - library to load resources from.
- // [out] state - new state. Must not be NULL.
- DWORD LoadState(SAFE_HMODULE* resource_library,
- scoped_ptr<State>* state) const;
- // Loads tables from the resources.
- // [in] resource_library - library to load resources from.
- // [out] tables - loaded tables. Must not be NULL.
- DWORD LoadTables(HMODULE resource_library,
- scoped_array<ResourceInMemory>* tables) const;
- // Loads parameters from the resources.
- // [in] resource_library - library to load resources from.
- // [out] parameters - loaded parameters. Must not be NULL.
- DWORD LoadParameters(HMODULE resource_library,
- scoped_array<DWORD>* parameters) const;
-
- // Internal state, holds all loaded data and owns a resource library handler.
- scoped_ptr<State> state_;
-
- DISALLOW_COPY_AND_ASSIGN(CldTables);
-};
-
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_TABLES_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.cc b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.cc
deleted file mode 100644
index 29c8d45..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h"
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
-
-
-// ResourceInMemory::State.
-
-struct ResourceInMemory::State {
- State()
- : resource(0) {
- }
-
- // Handle to the loaded resource.
- SAFE_RESOURCE resource;
- // Size of the loaded resource.
- DWORD size;
- // Pointer to the resource locked in memory.
- void* data;
-
- DISALLOW_COPY_AND_ASSIGN(State);
-};
-
-
-// ResourceInMemory.
-
-ResourceInMemory::ResourceInMemory() {
-}
-
-ResourceInMemory::~ResourceInMemory() {
- Unload();
-}
-
-
-DWORD ResourceInMemory::size() const {
- if (!state_.get())
- return 0;
- return state_->size;
-}
-
-void* ResourceInMemory::data() const {
- if (!state_.get())
- return NULL;
- return state_->data;
-}
-
-
-DWORD ResourceInMemory::Load(HMODULE library, const TCHAR* resource_id,
- const TCHAR* resource_type) {
- return LoadState(library, resource_id, resource_type, &state_);
-}
-
-
-bool ResourceInMemory::IsLoaded() const {
- return NULL != state_.get();
-}
-
-
-void ResourceInMemory::Unload() {
- state_.reset();
-}
-
-
-DWORD ResourceInMemory::LoadState(HMODULE library, const TCHAR* resource_id,
- const TCHAR* resource_type,
- scoped_ptr<State>* state) const {
- _ASSERT(state);
- if (!state)
- return ERROR_INVALID_PARAMETER;
-
- // Find the resource.
- HRSRC resource_source = ::FindResource(library, resource_id, resource_type);
- if (!resource_source)
- return ::GetLastError();
-
- // Allocate a new state.
- scoped_ptr<State> new_state(new State);
- if (!new_state.get())
- return ERROR_OUTOFMEMORY;
-
- // Check resource size.
- new_state->size = ::SizeofResource(library, resource_source);
- if (!new_state->size)
- return ::GetLastError();
-
- // Load resource.
- new_state->resource.reset(::LoadResource(library, resource_source));
- if (!new_state->resource.get())
- return ::GetLastError();
-
- // Lock resource in memory.
- new_state->data = ::LockResource(new_state->resource.get());
- if (!new_state->data)
- return ERROR_OUTOFMEMORY;
-
- // Safely put new state in place.
- swap(*state, new_state);
- return 0;
-}
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h b/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h
deleted file mode 100644
index 7ed5b71..0000000
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_RESOURCEINMEMORY_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_RESOURCEINMEMORY_H_
-
-#include <tchar.h>
-#include <windows.h>
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
-
-
-// Loads a resource of specified type and id and keeps it locked in memory.
-// Exposes pointer to the resource's raw data and size.
-class ResourceInMemory {
- public:
- // Creates an empty instance. All setup is done in Load().
- ResourceInMemory();
- // Clears everything, no need to explicitly call Unload().
- ~ResourceInMemory();
-
- // Loads a resource from DLL and keeps it in memory, ready for access.
- // [in] library - handle of a library to load the resource from.
- // library must not be unloaded until all resources in memory
- // are unloaded.
- // [in] resource_id - id of the resource to load.
- // [in] resource_type - type of the resource to load.
- // Returns: 0 in case of success, Windows GetLastError() code otherwise.
- // Does not unload currently owned resource in case of failure.
- DWORD Load(HMODULE library, const TCHAR* resource_id,
- const TCHAR* resource_type);
- // Returns true if it is loaded successfully.
- bool IsLoaded() const;
- // Unloads the resource.
- void Unload();
-
- // Size of the loaded resource.
- // Returns 0 if resource was not successfully loaded.
- DWORD size() const;
- // Pointer to the resource data.
- // Returns NULL if resource was not successfully loaded.
- void* data() const;
-
- private:
- // Forward declaration for ResourceInMemory internal state type.
- struct State;
-
- // Does the actual resource loading.
- // [in] library - handle of a library to load the resource from.
- // [in] resource_id - id of the resource to load.
- // [in] resource_type - type of the resource to load.
- // [out] state - newly loaded state. Must not be NULL.
- DWORD LoadState(HMODULE library, const TCHAR* resource_id,
- const TCHAR* resource_type, scoped_ptr<State>* state) const;
-
- // Internal state, holds all loaded data and owns a resource library handler.
- scoped_ptr<State> state_;
-
- DISALLOW_COPY_AND_ASSIGN(ResourceInMemory);
-};
-
-
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_RESOURCEINMEMORY_H_
diff --git a/third_party/cld/bar/toolbar/option_constants.h b/third_party/cld/bar/toolbar/option_constants.h
deleted file mode 100644
index 38790bd..0000000
--- a/third_party/cld/bar/toolbar/option_constants.h
+++ /dev/null
@@ -1,282 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Modified: zengjian@google.com
-// Extracted from the original options.h for sharing between external
-// components.
-
-#ifndef BAR_TOOLBAR_OPTIONS_CONSTANTS_H__
-#define BAR_TOOLBAR_OPTIONS_CONSTANTS_H__
-
-// Use a struct so that the original code works well without modification.
-struct OptionConstants {
- // Make sure that these values match those entered in bar/installer/install.h.
- enum UserOption {
- OPTION_STATUS_NO = 0, // Note: this is also the T4 state for off.
- OPTION_STATUS_YES = 1, // Note: this is also the T4 state for on.
- OPTION_STATUS_ASK_OPT_IN = 2,
- OPTION_STATUS_ASK_OPT_OUT = 3,
- };
-
- // List of all Toolbar options.
- enum Option {
- NONE,
- NEW_TAB,
- BROWSE_BY_NAME,
- LINK_DOCTOR,
- AUTOLINK,
- AUTOLINK_NEW_WINDOW,
- BOX_RIGHT_TO_LEFT,
- BOX_WIDTH,
- CONTEXT_MENU_ENABLED,
- CRASH_REPORTING_ENABLED,
- CURSOR_CHANGE_ON_KILL,
- DICTIONARY_FROM_LANG,
- DICTIONARY_TO_LANG,
- ENABLE_DC,
- ALERT_SERIAL,
- GOOGLE_HOME,
- HIDDEN,
- HOVER_DICTIONARY,
- INSTALLED_VERSION,
- ISBN_PROVIDER,
- KILL_POPUP_COUNT,
- KILL_POPUP_SOUND,
- LAST_CRASH_LOCATION,
- LAST_CRASH_TIME,
- LAST_INTRO_TIME,
- MAP_PROVIDER,
- NEW_WINDOW_OR_TAB,
- NO_ONUNLOAD,
- OPENSEARCH_FETCH_SUCCEEDED,
- POPUP_BLOCKER_WHITELIST,
- POPUP_DISABLE_SCRIPT_ERRORS,
- PREEMPT,
- PREVIOUS_VERSION,
- PRIV_WARN,
- REBAR_BREAK,
- SHOW_DC_FAREWELL,
- SPELL_DEFAULT_LANGUAGE,
- SPELL_IGNORE_CAPS,
- SPELL_IGNORE_DIGITS,
- SPELL_IGNORE_DUPS,
- SPELL_LAST_LANGUAGE,
- SUGGEST_USE_HTML,
- SUGGEST_BOOKMARKS,
- SUGGEST_QUERIES,
- STORE_HISTORY,
- TOOLTIPS,
- USAGE_STATS_ENABLED,
- VERBOSITY,
- VIN_PROVIDER,
- WHATS_NEW_URL,
- BOOKMARK_SORT_ORDER,
- PROTECTOR_OFFER_REPORTED,
- SHOULD_OFFER_REENABLE,
- BEFORE_OFFER_DS, // The default search value before protector offer.
- TOAST_OFFERED, // Set if an update toast was shown.
- WELCOME_TOAST_OFFERED, // Set per user and indicates that the initial
- // welcome toast was offered.
- AUTOFILL_POSITIVE_UPLOAD_RATE,
- AUTOFILL_NEGATIVE_UPLOAD_RATE,
- WORDFIND_ENABLE,
- WORDFIND_FIND_AS_YOU_TYPE,
- USE_GMAIL_FOR_MAILTO,
- MSXML_FAILED_COUNT,
- MSXML_FAILED_LAST,
- AUTO_FILL_IMPORT_DATA_OFFERED,
- SYNC_BALLOON_SHOWN,
- SYNC_SHOULD_PROMOTE,
- SYNC_PROMOTION_BALLOON_COUNT,
- BOOKMARK_HIGHLIGHTS_ENABLED,
- GAIA_SIGNIN_TIME, // Tick count of last GAIA signin event.
- ENABLE_X_BUTTON,
- HIDDEN_TOOLBARS,
- SIDEBAR_VISIBLE,
- SIDEBAR_ACTIVE_FEATURE,
-
- // Installer options
- SETUP_IS_INSTALLING,
- SETUP_TARGET_HOME,
- SETUP_TOAST_DELAY,
- SETUP_EULA_ACCEPTED,
- SETUP_SHOW_PRIVACY_POLICY_UPDATE,
- SETUP_USAGE_STATS_ENABLED,
- SETUP_ALLOW_INTERACTIONS,
- SETUP_ENABLE_SEARCH_PROTECTOR,
- SETUP_DISABLE_BBN,
-
- // Toolbar state options
- TOOLBAR_DISABLED,
-
- // Toast options
- TOAST_SET_DEFAULT_SEARCH,
- TOAST_SET_PAGE_RANK,
- TOAST_SET_HOME_PAGE,
-
- // Button visibility options
- BUTTON_AUTO_FILL,
- BUTTON_AUTO_LINK,
- BUTTON_CO_BRAND_SEARCH,
- BUTTON_COUNTRY_SEARCH,
- BUTTON_CUSTOM_BUTTONS_MENU,
- BUTTON_FROOGLE_SEARCH,
- BUTTON_GROUPS_SEARCH,
- BUTTON_GO,
- BUTTON_HIGHLIGHT,
- BUTTON_IMAGES_SEARCH,
- BUTTON_LOCAL_SEARCH,
- BUTTON_LUCKY,
- BUTTON_NEW_PRODUCT_OFFER,
- BUTTON_NEWS_SEARCH,
- BUTTON_PAGE_RANK,
- BUTTON_POPUP_KILLER,
- BUTTON_SEND_TO_MENU,
- BUTTON_SITE_SEARCH,
- BUTTON_SPELLCHECK,
- BUTTON_STAR_BOOKMARK,
- BUTTON_TRANSLATE_MENU,
- BUTTON_UP,
- BUTTON_VIDEO_SEARCH,
- BUTTON_WHATS_NEW,
- BUTTON_WEB_HISTORY,
- BUTTON_WEB_HISTORY_SEARCH,
-
- // Debug options
- DEBUG_AUTOLINK_SERVER,
- DEBUG_AUTOLINK_PORT,
- DEBUG_AUTOLINK_PATH,
- DEBUG_AUTOLINK_REDIR_PORT,
- DEBUG_AUTOLINK_REDIR_PATH,
- DEBUG_SPELL_SERVER,
- DEBUG_SPELL_PORT,
- DEBUG_SPELL_PATH,
- DEBUG_DICT_SERVER,
- DEBUG_DICT_PORT,
- DEBUG_DICT_PATH,
- DEBUG_ACCOUNT_SERVER,
- DEBUG_ACCOUNT_PORT,
- DEBUG_ACCOUNT_PATH,
- DEBUG_NOTEBOOK_SERVER,
- DEBUG_NOTEBOOK_PORT,
- DEBUG_NOTEBOOK_URL_HOST,
- DEBUG_NOTEBOOK_URL_PORT,
- DEBUG_BOOKMARK_SERVER,
- DEBUG_BOOKMARK_PORT,
- DEBUG_STAT_SERVER,
- DEBUG_STAT_PORT,
- DEBUG_STAT_PATH,
- DEBUG_STAT_SEND_INTERVAL,
- DEBUG_UMA_ENABLED,
- DEBUG_UMA_SERVER, // UMA (User Metrics Analysis) server.
- DEBUG_UMA_PORT,
- DEBUG_UMA_PATH,
- DEBUG_UMA_CONTENT_TYPE,
- DEBUG_SUGGEST_SERVER,
- DEBUG_SUGGEST_PORT,
- DEBUG_SUGGEST_PATH,
- DEBUG_SUGGEST_HTML_URL,
- DEBUG_NEWTAB_HTML_URL,
- DEBUG_BLOGTHIS_SERVER,
- DEBUG_BLOGTHIS_PORT,
- DEBUG_BLOGTHIS_PATH,
- DEBUG_GMAILTHIS_SERVER,
- DEBUG_GMAILTHIS_PORT,
- DEBUG_GMAILTHIS_REQ_PATH,
- DEBUG_GMAILTHIS_POST_PATH,
- DEBUG_AUTOUPDATE_SERVER,
- DEBUG_AUTOUPDATE_PORT,
- DEBUG_AUTOUPDATE_PATH,
- DEBUG_PROMOPING_SERVER,
- DEBUG_PROMOPING_PORT,
- DEBUG_PROMOPING_PATH,
- DEBUG_PAGERANK_SERVER,
- DEBUG_PAGERANK_ALTERNATE_SERVER,
- DEBUG_AUTOFILL_QUERY_SERVER,
- DEBUG_AUTOFILL_UPLOAD_SERVER,
- DEBUG_AUTOFILL_QUERY_PORT,
- DEBUG_AUTOFILL_UPLOAD_PORT,
- DEBUG_AUTOFILL_QUERY_PATH,
- DEBUG_AUTOFILL_UPLOAD_PATH,
- DEBUG_AUTOFILL_QUERY_ENABLED,
- DEBUG_AUTOFILL_UPLOAD_ENABLED,
- DEBUG_AUTOFILL_USE_TYPENAMES,
- DEBUG_SYNC_SERVER,
- DEBUG_SYNC_PORT,
- DEBUG_SYNC_DELAY_BETWEEN_SYNC_SEC, // Delay between periodic syncs in
- // seconds.
- DEBUG_SYNC_WAKEUP_CYCLE_SEC, // Sync download thread wake up cycle in
- // seconds.
- DEBUG_SYNC_RESYNC_DELAY_SEC, // Delay between sync retries in seconds.
- DEBUG_WEB_HISTORY_SERVER,
- DEBUG_WEB_HISTORY_PORT,
- DEBUG_WEB_HISTORY_PATH,
- DEBUG_WEB_HISTORY_URL_HOST,
- DEBUG_WEB_HISTORY_URL_PORT,
- DEBUG_LINKDOCTOR_SERVER,
- DEBUG_LINKDOCTOR_PORT,
- DEBUG_LINKDOCTOR_PATH,
- DEBUG_GADGET_HTML_SERVER,
- DEBUG_GADGET_HTML_PATH,
- DEBUG_GADGET_OPTIONS_SERVER,
- DEBUG_GADGET_OPTIONS_PATH,
- DEBUG_GADGET_RENDER_SERVER,
- DEBUG_GADGET_RENDER_PATH,
- DEBUG_GADGET_AUTO_CLOSE,
- DEBUG_OPENSEARCH_QUERY_SERVER,
- DEBUG_OPENSEARCH_QUERY_PORT,
- DEBUG_OPENSEARCH_QUERY_PATH,
- DEBUG_PREFETCH_SB_TIMEOUT, // Prefetch timeout for search box.
- DEBUG_PREFETCH_AB_TIMEOUT, // Prefetch timeout for address bar.
- DEBUG_CONTENT_UPDATE_CHECK_CYCLE_SEC, // Cycle for periodically pinging the
- // server for static content update
- // checks in seconds.
- DEBUG_CONTENT_UPDATE_WAKEUP_CYCLE_SEC, // Wake up cycle for checking
- // content updates in seconds.
- DEBUG_CONTENT_UPDATE_SERVER, // Static content update server.
- DEBUG_CONTENT_UPDATE_PORT, // Static content update port.
- DEBUG_TRANSLATE_HTTP_SERVER,
- DEBUG_TRANSLATE_HTTPS_SERVER,
- DEBUG_TRANSLATE_GZIP_REQUEST,
-
- // Last fixed option and the first extended option.
- LAST_INTERNAL_OPTION,
- };
-
- // Available types of options.
- enum Type {
- TYPE_NONE,
- TYPE_INT,
- TYPE_UINT,
- TYPE_STRING,
- TYPE_BOOL,
- TYPE_LAST // Must be last in the enum.
- };
-
- // Option location
- enum Location {
- LOCATION_PER_USER, // Per-user settings.
- LOCATION_PER_MACHINE, // Per-machine settings.
- LOCATION_DEBUG, // Debug options. It will return default values in retail.
- LOCATION_LAST // Must be last in the enum.
- };
-
- enum ChangeCause {
- CAUSE_LOADING, // The value is loaded off the registry.
- CAUSE_MODIFY, // SetX called.
- CAUSE_RESET, // ResetToDefaults called.
- };
-
- enum ModifyCompletion {
- MODIFY_COMMIT, // All modifications will be saved to registry.
- MODIFY_DISCARD, // Throw away all the modifications.
- };
-
- enum ResetBehavior {
- RESET,
- KEEP,
- };
-};
-
-#endif // BAR_TOOLBAR_OPTIONS_CONSTANTS_H__
diff --git a/third_party/cld/bar/toolbar/optionsinterface.h b/third_party/cld/bar/toolbar/optionsinterface.h
deleted file mode 100644
index 9426612..0000000
--- a/third_party/cld/bar/toolbar/optionsinterface.h
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Author: Vadim Berman <vadimb>
-
-#ifndef BAR_TOOLBAR_OPTIONSINTERFACE_H_
-#define BAR_TOOLBAR_OPTIONSINTERFACE_H_
-
-#include "cld/bar/toolbar/option_constants.h"
-
-// Interface to the Options class. See more comments in "bar/toolbar/options.h".
-
-// Forward event args declaration.
-struct OnOptionArgs;
-struct OnChangeArgs;
-struct OnDefaultArgs;
-struct OnRestrictedArgs;
-class ExternalOptions;
-template <typename T> class Callback;
-
-// The Toolbar options service. You can access it from toolbar.options().
-struct IOptions : public OptionConstants {
- public:
-public:
- struct Definition {
- Option option;
- Type type;
- Location location;
- CString name; // For internal options, it equals to the
- // registry name.
- ResetBehavior reset_behavior;
- CComVariant default_value;
- bool synchronizable; // Can be synced across computers.
- CString legacy_registry_name; // The name in T1..T3 (options version 1.1)
- CString class_id; // The clsid of the component that the option
- // belongs to.
- };
-
-
- virtual ~IOptions() {}
-
- // Same as GetOptionCount but different type to avoid tiresome static_casts.
- virtual Option GetLastOption() = 0;
-
- // (Re)Init external options from satellite resource.
- virtual void InitExternalOptions() = 0;
-
- // Get option range for a external component by class id.
- virtual Option GetExternalOptionId(
- const CString& class_id, const CString& name) = 0;
-
-
- virtual ExternalOptions* GetExternalOptions() = 0;
-
- virtual void ResetSyncCacheOpened() = 0;
-
- // Forces to unload the current synchronizable option data loaded in memory.
- // This covers a rare corner case happened in sync, when option data needs
- // to switch between different users's cached data without any new data
- // change involved. In such case, PersistedChangeNumber() never changes,
- // therefore Refresh() function will not detect the data change, and we need
- // to call this function to force options to unload its data in memory.
- virtual void UnloadSynchronizableOptionData() = 0;
-
- // Clone the existing options. This method will clone only the data, callbacks
- // will not be cloned.
- virtual IOptions* Clone() = 0;
-
- // Tells the options system to not persist the changes to the registry. Every
- // call to BeginModify() must be balanced with call to EndModify();
- virtual void BeginModify() = 0;
- // Persists or discards the modified options.
- virtual void EndModify(ModifyCompletion action) = 0;
- // PERMANENTLY disable persistance.
- // This is used after uninstall to prevent "zombie" toolbars from writing
- // to the registry.
- virtual void DisablePersist() = 0;
-
- // Discards any in memory changes (while within Begin/EndModify)
- virtual void DiscardModifications() = 0;
-
- // Resets all the options to default value. It will not save the options.
- virtual void ResetToDefaults() = 0;
- // Deletes all the options values (not set to default, DELETE). This call will
- // also delete event the options set with KEEP. It delete really ALL
- virtual void ObliterateAll() = 0;
-
- // If current options are out of sync, re-load the modified values
- virtual void Refresh() = 0;
-
- // Options types definitions.
- virtual Type GetType(Option option) = 0;
- virtual Location GetLocation(Option option) = 0;
- virtual const TCHAR* GetName(Option option) = 0;
- virtual CString GetRegistryName(Option option) = 0;
- virtual const TCHAR* GetLegacyName(Option option, DWORD version) = 0;
- virtual const TCHAR* GetClassId(Option option) = 0;
-
- // Returns true if the option is a serve cache copy.
- virtual bool IsServerCache(Option option) = 0;
- // Sets the value of is_server_cache_ of an option.
- virtual void SetIsServerCache(Option option, bool value) = 0;
- // Sets the option store for the current sync user.
- virtual void SetOptionServerCacheStore(const CString& current_sync_user) = 0;
-
- // Returns true if the options has been modified and not saved.
- virtual bool IsModified(Option option) = 0;
- virtual void SetModified(Option option, bool modified) = 0;
- // Returns true if some option has been modified.
- virtual bool AnyOptionModified() = 0;
-
- // Default value
- virtual CComVariant GetDefaultValue(Option option) = 0;
- virtual void ResetToDefault(Option option) = 0;
-
- // Restricted options
- virtual bool IsRestrictedOption(Option option) = 0;
- virtual CComVariant GetRestrictedValue(Option option) = 0;
- virtual bool IsReadonlyOption(Option option) = 0;
-
- // Getters
- virtual int GetInt(Option option) = 0;
- virtual unsigned int GetUint(Option option) = 0;
- virtual CString GetString(Option option) = 0;
- virtual bool GetBool(Option option) = 0;
- // Get a setup option - this is an option which can be either yes, no or "Ask
- // the user".
- // option: The option to query.
- // always_return_yes_or_no:
- // If true, the function will convert "Ask" results to their
- // defaults.
- // Please note: The option itself is an integer option.
- virtual UserOption GetToastOption(Option option,
- bool always_return_yes_or_no) = 0;
-
- // Setters
- virtual HRESULT SetInt(Option option, int value) = 0;
- virtual HRESULT SetUint(Option option, unsigned int value) = 0;
- virtual HRESULT SetString(Option option, const TCHAR* value) = 0;
- virtual HRESULT SetBool(Option option, bool value) = 0;
- // Set a user option.
- virtual HRESULT SetToastOption(Option option, UserOption value) = 0;
- // Allows setting of read-only (setup) options at runtime.
- virtual HRESULT SetReadOnlyBool(Option option, bool value) = 0;
- virtual HRESULT SetReadOnlyInt(Option option, int value) = 0;
-
- // Fires when the system need the obtain custom default value for option.
- // If you register handler for NONE option it will fire for every request
- // for option default value.
- virtual void SetOnDefaultHandler(Option option,
- Callback<OnDefaultArgs>* callback) = 0;
-
- // Fires just before new option value is to be saved (or deleted) to the
- // registry. If you register handler for NONE option it will fire for every
- // option save.
- virtual void SetOnSaveHandler(Option option,
- Callback<OnOptionArgs>* callback) = 0;
-
- // Fires after SaveAll() saves the options to the registry. If you call
- // SaveAll() and AnyOptionModified() returns false, this event will not fire.
- virtual void SetOnSaveAllHandler(Callback<OnOptionArgs>* callback) = 0;
-
- // Fires when a option value is modified. If you register handler for NONE
- // option it will fire for every option change.
- virtual void SetOnChangeHandler(Option option,
- Callback<OnChangeArgs>* callback) = 0;
-
- // Fires when the system need the obtain restricted value for option.
- // If you register handler for NONE option it will fire for every request
- // for restricted value. Option that do not wish to be restricted must return
- // VT_EMPTY for the value.
- virtual void SetOnRestrictedHandler(Option option,
- Callback<OnRestrictedArgs>* callback) = 0;
-
- // This function triggers a call to OnChangeGoogleHome.
- virtual HRESULT FireOnChangeGoogleHome() = 0;
-
-
- // TODO(zelidrag): These used to be private / protected before,
- // we should have a better way to refactor them
- // Returns true if the option is synchronizable.
- virtual bool Synchronizable(Option option) = 0;
-
- virtual bool GetBoolLocalForced(Option option) = 0;
- virtual int GetIntLocalForced(Option option) = 0;
- virtual unsigned int GetUintLocalForced(Option option) = 0;
- virtual CString GetStringLocalForced(Option option) = 0;
-
- virtual HRESULT SetBoolSyncForced(Option option, bool value) = 0;
- virtual HRESULT SetIntSyncForced(Option option, int value) = 0;
- virtual HRESULT SetUintSyncForced(Option option, unsigned int value) = 0;
- virtual HRESULT SetStringSyncForced(Option option, const TCHAR* value) = 0;
-
- virtual bool IsPersistedInServerCache(Option option) = 0;
-
- virtual HRESULT SetBoolLocalForced(Option option, bool value) = 0;
- virtual HRESULT SetIntLocalForced(Option option, int value) = 0;
- virtual HRESULT SetUintLocalForced(Option option, unsigned int value) = 0;
- virtual HRESULT SetStringLocalForced(Option option, const TCHAR* value) = 0;
- virtual HRESULT DeletePersistedLocalOption(Option option) = 0;
-};
-
-
-
-#endif // BAR_TOOLBAR_OPTIONSINTERFACE_H_
diff --git a/third_party/cld/bar/toolbar/toolbarevents.h b/third_party/cld/bar/toolbar/toolbarevents.h
deleted file mode 100644
index 28c78b1..0000000
--- a/third_party/cld/bar/toolbar/toolbarevents.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Author: yzshen@google.com (Yuzhu Shen)
-
-#ifndef BAR_TOOLBAR_TOOLBAREVENTS_H_
-#define BAR_TOOLBAR_TOOLBAREVENTS_H_
-
-#include "cld/bar/toolbar/optionsinterface.h"
-#include "common/toolbar_api.h"
-
-class ATL_NO_VTABLE KeyboardEventInfo
- : public CComObjectRootEx<CComMultiThreadModel>,
- public IKeyboardEventInfo {
- public:
- BEGIN_COM_MAP(KeyboardEventInfo)
- COM_INTERFACE_ENTRY(IKeyboardEventInfo)
- END_COM_MAP()
-
- KeyboardEventInfo() : key_code_(0), flags_(0) {}
-
- void Set(WPARAM key_code, LPARAM flags);
-
- STDMETHODIMP get_KeyCode(WPARAM* key_code);
- STDMETHODIMP get_Flags(LPARAM* flags);
-
- private:
- WPARAM key_code_;
- LPARAM flags_;
-
- DISALLOW_EVIL_CONSTRUCTORS(KeyboardEventInfo);
-};
-
-class ATL_NO_VTABLE MousePointInfo
- : public CComObjectRootEx<CComMultiThreadModel>,
- public IMousePointInfo {
- public:
- BEGIN_COM_MAP(MousePointInfo)
- COM_INTERFACE_ENTRY(IMousePointInfo)
- END_COM_MAP()
-
- MousePointInfo();
-
- void set_MousePoint(LONG x_loc, LONG y_loc);
- void set_MousePoint(const POINT& point) { point_ = point; }
-
- STDMETHODIMP get_MousePoint(POINT* mouse_point);
-
- private:
- POINT point_;
-
- DISALLOW_EVIL_CONSTRUCTORS(MousePointInfo);
-};
-
-class ATL_NO_VTABLE OptionChangeInfo
- : public CComObjectRootEx<CComMultiThreadModel>,
- public IOptionChangeInfo {
- public:
- BEGIN_COM_MAP(OptionChangeInfo)
- COM_INTERFACE_ENTRY(IOptionChangeInfo)
- END_COM_MAP()
-
- OptionChangeInfo() : option_id_(0), change_cause_(0) {}
-
- void Set(IOptions::Option option_id,
- const CString& option_name,
- IOptions::ChangeCause change_cause);
-
- STDMETHODIMP get_OptionId(LONG *option_id);
- STDMETHODIMP get_OptionName(BSTR* option_name);
- STDMETHODIMP get_ChangeCause(LONG* change_cause);
-
- private:
- LONG option_id_;
- CString option_name_;
- LONG change_cause_;
-
- DISALLOW_EVIL_CONSTRUCTORS(OptionChangeInfo);
-};
-
-class ATL_NO_VTABLE SidebarWidthChangedInfo
- : public CComObjectRootEx<CComMultiThreadModel>,
- public ISidebarWidthChangedInfo {
- public:
- BEGIN_COM_MAP(SidebarWidthChangedInfo)
- COM_INTERFACE_ENTRY(ISidebarWidthChangedInfo)
- COM_INTERFACE_ENTRY(IToolbarEvent)
- END_COM_MAP()
-
- SidebarWidthChangedInfo() : width_(0) {}
-
- void Set(LONG width) { width_ = width; }
-
- STDMETHODIMP get_Width(LONG* width);
-
- private:
- LONG width_;
-
- DISALLOW_EVIL_CONSTRUCTORS(SidebarWidthChangedInfo);
-};
-
-
-class ATL_NO_VTABLE PageSelectionChangedInfo
- : public CComObjectRootEx<CComMultiThreadModel>,
- public IPageSelectionChangedInfo {
- public:
- BEGIN_COM_MAP(PageSelectionChangedInfo)
- COM_INTERFACE_ENTRY(IPageSelectionChangedInfo)
- COM_INTERFACE_ENTRY(IToolbarEvent)
- END_COM_MAP()
-
- PageSelectionChangedInfo() : is_text_selected_(FALSE) {}
-
- void SetIsTextSelected(BOOL has_selection) {
- is_text_selected_ = has_selection;
- }
-
- STDMETHODIMP get_IsTextSelected(BOOL* is_text_selected);
-
- private:
- BOOL is_text_selected_;
-
- DISALLOW_EVIL_CONSTRUCTORS(PageSelectionChangedInfo);
-};
-
-class ATL_NO_VTABLE ButtonDropdownInfo
- : public CComObjectRootEx<CComMultiThreadModel>,
- public IButtonDropdownInfo {
- public:
- BEGIN_COM_MAP(ButtonDropdownInfo)
- COM_INTERFACE_ENTRY(IButtonDropdownInfo)
- COM_INTERFACE_ENTRY(IToolbarEvent)
- END_COM_MAP()
-
- ButtonDropdownInfo() : replacement_command_(0) {}
-
- STDMETHODIMP put_ReplacementCommand(LONG replacement_command) {
- replacement_command_ = replacement_command;
- return S_OK;
- }
-
- STDMETHODIMP get_ReplacementCommand(LONG *replacement_command) {
- *replacement_command = replacement_command_;
- return S_OK;
- }
-
- private:
- LONG replacement_command_;
-
- DISALLOW_EVIL_CONSTRUCTORS(ButtonDropdownInfo);
-};
-#endif // BAR_TOOLBAR_TOOLBAREVENTS_H_
diff --git a/third_party/cld/bar/toolbar/userbroker.h b/third_party/cld/bar/toolbar/userbroker.h
deleted file mode 100644
index e342949..0000000
--- a/third_party/cld/bar/toolbar/userbroker.h
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Author: Tom Wuttke (tw@google.com)
-//
-// This file defines the main userbroker api (see design doc at
-// /eng/designdocs/navclient/toolbar-userbroker.html
-
-#ifndef BAR_TOOLBAR_USERBROKER_H_
-#define BAR_TOOLBAR_USERBROKER_H_
-
-#include "cld/bar/common/installhelper.h"
-#include "shared/closed/financial/rlz/win/lib/rlz_lib.h"
-
-struct IUserBrokerProxy;
-
-namespace user_broker {
-
-// Call this to init the broker API from the broker or IE process.
-// Must be called before any other user_broker function.
-bool InitApi(bool set_is_broker);
-
-// Call this to release resources hold by the broker before the toolbar
-// is shut down.
-void TearDown();
-
-// Call this to inform the broker the current process has high privileges.
-// On XP, this will always return true, and set a flag so that future calls
-// to IsHighRights() will succeed. On Vista, this will return false if the
-// current process doesn't really have a high mandatory level.
-bool DeclareHighRightsProcess();
-
-// Get which integrity level the current process running at. On Vista, this is
-// accurate. On XP, this is inferred from InitAPI()/DeclareHighRightsProcess().
-MANDATORY_LEVEL GetProcessIntegrity();
-
-// True if the broker is operational. Call this from the toolbar startup
-// code to see if anything is wrong before making a toolbar object.
-bool IsBrokerOK();
-
-// Given a file path, resolve to an absolute path, and return true only if this
-// path should be writeable by the toolbar userbroker or not.
-bool ValidateToolbarFilePath(const TCHAR* path, TCHAR* full_path,
- bool create_directory);
-
-// Given a reg path, resolve to an absolute reg path, and return true only if
-// this reg key should be writeable by the toolbar userbroker or not.
-bool ValidateToolbarRegistryPath(HKEY root, const TCHAR* path, REGSAM wow64);
-
-bool IsUserBrokerProcess(HMODULE dll_instance);
-
-// Returns the actual userbroker.exe file name when called from the toolbar.
-CString GetUserStubExeFilename();
-
-// These next functions are exact replicas of Win32 API functions - except
-// that they live inside the user_broker namespace, and will dispatch
-// the broker process if the operation requires writing.
-
-// ValidateToolbarFilePath or ValidateToolbarRegistryPath are called
-// before opening any handle for writing by the broker
-
-LONG RegCreateKeyEx(HKEY key, const TCHAR* sub_key, DWORD reserved,
- TCHAR* key_class, DWORD options, REGSAM sam_desired, SECURITY_ATTRIBUTES*
- security_attributes, HKEY* result, DWORD* disposition);
-
-LONG RegOpenKeyEx(HKEY key, const TCHAR* sub_key, DWORD options,
- REGSAM sam_desired, HKEY* result);
-
-DWORD RegDeleteTree(HKEY key_root, const TCHAR* key_path, REGSAM wow64);
-
-DWORD SHCreateDirectory(HWND window, const TCHAR* path);
-
-HANDLE CreateFile(const TCHAR* file_name, DWORD desired_access,
- DWORD share_mode, SECURITY_ATTRIBUTES* security_attributes,
- DWORD creation_disposition, DWORD flags, HANDLE template_file);
-
-BOOL DeleteFile(const TCHAR* file_name);
-
-BOOL RemoveDirectory(const TCHAR* path);
-
-BOOL MoveFileEx(const TCHAR* file_name, const TCHAR* new_name,
- DWORD flags);
-
-BOOL CopyFile(const TCHAR* file_name, const TCHAR* new_name,
- BOOL fail_if_exists);
-
-// The UserBrokerProxy is a simple COM interface so that the search
-// box module (which is outside of the toolbar code space) can use the broker
-// from the host toolbar to write and delete user files.
-HRESULT GetUserBrokerProxy(IUserBrokerProxy** broker_proxy);
-
-bool ApplyPatch(const TCHAR* patch);
-
-BOOL DeleteInUseFile(const TCHAR* file_name);
-
-// Fixes the IE menus by deleted broken registry keys.
-bool FixMenus();
-
-// True if the current process has elevated rights
-// (or if XP is simulating it via DeclareHighRightsProcess).
-// InitApi must be called before this function.
-inline bool IsHighRights() {
- return GetProcessIntegrity() >= MandatoryLevelHigh;
-}
-
-// True if the current process is in low rights protected mode
-// (or if XP is simulating it via InitAPI(false)).
-// InitApi must be called before this function.
-inline bool IsLowRights() {
- return GetProcessIntegrity() <= MandatoryLevelLow;
-}
-
-// True if the current process is virtualized
-// (or if XP is simulating it via InitAPI(false)).
-// InitApi must be called before this function.
-bool IsVirtualized();
-
-// True if the current process will need to use the broker to do the sort of
-// things that sometimes require using a broker (such as modifying shared
-// registry keys and files).
-// InitApi must be called before this function.
-inline bool ShouldUseBroker() {
- return IsVirtualized() || IsLowRights();
-}
-
-HRESULT Uninstall(const TCHAR* user_sid, HWND skip_window, HANDLE* process);
-
-// Wipe any virtualized files or reg keys from known toolbar paths
-HRESULT CleanVirtualizedPaths();
-
-// Enables toolbar in case user has disabled it specifically
-void EnableGoogleToolbar();
-
-// Finds all the interesting virtual folders via user broker and adds them
-// to the set.
-bool FindVirtualFolders(std::set<CString> *folder_set);
-
-// Call the updater service to verify and execute this exe
-HRESULT ExecuteGoogleSignedExeElevated(const TCHAR* exe, const TCHAR* args,
- HANDLE* process, bool allow_network_check);
-
-// True if the google update service is available
-bool IsUpdaterServiceAvailable();
-
-// Send a crash report. file_path indicates the minidump path, last_url
-// contains the last URL accessed, and last_command contains the last
-// command used. Returns S_OK if the default crash handler should still be used,
-// S_FALSE if it should not, and E_FAIL in case of failure.
-HRESULT SendCrashReport(LPCTSTR file_path,
- LPCTSTR last_url,
- int last_command,
- bool silent);
-
-// Clear all events reported by this product.
-bool RlzClearAllProductEvents(rlz_lib::Product product, const WCHAR* sid);
-
-// Parses RLZ related ping response. See comments to rlz_lib::ParsePingResponse.
-bool RlzParsePingResponse(rlz_lib::Product product, const WCHAR* response,
- const WCHAR* sid);
-
-// Parses RLZ related ping response. See comments to rlz_lib::SetAccessPointRlz.
-bool RlzSetAccessPointRlz(rlz_lib::AccessPoint point, const WCHAR* new_rlz,
- const WCHAR* sid);
-
-// Records an RLZ event. See rlz_lib::RecordProductEvent for more comments.
-bool RlzRecordProductEvent(rlz_lib::Product product, rlz_lib::AccessPoint point,
- rlz_lib::Event event_id, const WCHAR* sid);
-
-// Adds RLS information to the RLZ library. See rlz_lib::RecordProductRls for
-// more comments. Unlike rlz_lib::RecordProductRls, this function only accepts
-// one access point because we only call it for one access point.
-bool RlzRecordProductRls(rlz_lib::Product product, rlz_lib::AccessPoint point,
- const WCHAR* rls_value, const WCHAR* sid);
-
-// Parses the responses from the financial server.
-// See rlz_lib::ParseFinancialPingResponse for more comments.
-bool RlzParseFinancialPingResponse(rlz_lib::Product product,
- const WCHAR* response, const WCHAR* sid);
-
-// Sets focus to window.
-bool SetFocus(HWND hwnd);
-
-// Compares text with content of IE's address bar.
-bool IsEqualAddressBarText(HWND hwnd, const TCHAR* text);
-
-// The following are QSB API wrappers. Currently QSB API requires medium
-// integrity level to work so it can't be called directly from Toolbar.
-// QSB API is also not thread safe in a way that Initialize/Uninitialize must
-// be called in the same thread as all the rest functions. Thus API is
-// initialized and uninitialized on each RPC call to any of API functions.
-// See shared/quick_search_box/qsb_host_api/qsb_api.h for specific info about
-// each function.
-// TODO(avayvod): Implement load of QSB dll in user broker once so it's not
-// loaded/unloaded on each API call.
-bool QsbApiEnable(bool enable);
-bool QsbApiIsEnabled();
-bool QsbApiIsInstalled();
-bool QsbApiIsTaskbarButtonEnabled();
-bool QsbApiEnableTaskbarButton(bool enable);
-bool QsbApiSetGoogleDomain(const TCHAR* google_domain);
-
-// Registers histogram.
-bool RegisterHistogram(int type,
- const TCHAR* name,
- int minimum,
- int maximum,
- int bucket_count,
- int flags);
-
-// Adds histogram value.
-bool AddHistogramValue(const TCHAR* name,
- int value);
-
-// Returns HTML representation of accumulated histograms.
-// Query could define prefix of histogram names (i.e. DNS) to be used in graph.
-bool GetHistogramGraph(const TCHAR* query,
- CString* graph_html);
-
-// Returns current state of MetricsLog ready for UMA submission (XML & BZ2).
-bool GetMetricsLogSubmission(CString* metrics_log);
-
-// Passes current value of UsageStatsEnabled option to MetricsService.
-bool UsageStatsEnable(bool enable);
-
-// Use user_broker::CAtlFile if you want the create function brokered.
-class CAtlFile : public ::CAtlFile {
- public:
- CAtlFile() {
- }
-
- // Base class takes ownership over the file handle.
- explicit CAtlFile(HANDLE hFile) : ::CAtlFile(hFile) {
- }
-
- // Same as the ATL function but uses the user_broker on CreateFile
- HRESULT Create(LPCTSTR szFilename,
- DWORD dwDesiredAccess,
- DWORD dwShareMode,
- DWORD dwCreationDisposition,
- DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL,
- LPSECURITY_ATTRIBUTES lpsa = NULL,
- HANDLE hTemplateFile = NULL) {
- ATLASSERT(m_h == NULL);
-
- HANDLE hFile = user_broker::CreateFile(szFilename,
- dwDesiredAccess,
- dwShareMode,
- lpsa,
- dwCreationDisposition,
- dwFlagsAndAttributes,
- hTemplateFile);
- if (hFile == INVALID_HANDLE_VALUE)
- return AtlHresultFromLastError();
-
- Attach(hFile);
- return S_OK;
- }
- DISALLOW_EVIL_CONSTRUCTORS(CAtlFile);
-};
-
-// A convenience function for setting Windows' last error based on an HRESULT
-// received from the user broker server. This function is used internally by
-// the user broker and does not need to be used by users of the user broker
-// (usually;^).
-DWORD SetLastErrorFromAtlError(HRESULT result);
-
-} // namespace user_broker
-
-
-#endif // BAR_TOOLBAR_USERBROKER_H_
diff --git a/third_party/cld/cld.gyp b/third_party/cld/cld.gyp
index 91a9588..ce6db41 100644
--- a/third_party/cld/cld.gyp
+++ b/third_party/cld/cld.gyp
@@ -8,7 +8,7 @@
'target_name': 'cld',
'type': '<(library)',
'dependencies': [
- '../icu/icu.gyp:icuuc',
+ '../icu/icu.gyp:icuuc',
],
'include_dirs': [
'.',
@@ -17,76 +17,58 @@
'CLD_WINDOWS',
],
'sources': [
- 'bar/common/scopedptr.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg_empty.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h',
+ 'encodings/compact_lang_det/cldutil.cc',
+ 'encodings/compact_lang_det/cldutil.h',
+ 'encodings/compact_lang_det/cldutil_dbg.h',
+ 'encodings/compact_lang_det/cldutil_dbg_empty.cc',
+ 'encodings/compact_lang_det/compact_lang_det.cc',
+ 'encodings/compact_lang_det/compact_lang_det.h',
+ 'encodings/compact_lang_det/compact_lang_det_impl.cc',
+ 'encodings/compact_lang_det/compact_lang_det_impl.h',
+ 'encodings/compact_lang_det/ext_lang_enc.cc',
+ 'encodings/compact_lang_det/ext_lang_enc.h',
+ 'encodings/compact_lang_det/getonescriptspan.cc',
+ 'encodings/compact_lang_det/getonescriptspan.h',
+ 'encodings/compact_lang_det/letterscript_enum.cc',
+ 'encodings/compact_lang_det/letterscript_enum.h',
+ 'encodings/compact_lang_det/subsetsequence.cc',
+ 'encodings/compact_lang_det/subsetsequence.h',
+ 'encodings/compact_lang_det/tote.cc',
+ 'encodings/compact_lang_det/tote.h',
+ 'encodings/compact_lang_det/utf8propjustletter.h',
+ 'encodings/compact_lang_det/utf8propletterscriptnum.h',
+ 'encodings/compact_lang_det/utf8scannotjustletterspecial.h',
+ 'encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc',
+ 'encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc',
+ 'encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc',
+ 'encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h',
# For now using the compact 34 bytes detection in order to save hundreds of KBs on the final package.
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h',
- # We use the static table at this point, so we don't need to compile the following files:
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_dynamicstate.cc',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.cc',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicy.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_loadpolicyinterface.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_resourceids.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_service.cc',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_serviceinterface.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.cc',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_tables.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.cc',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/resourceinmemory.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_windows.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h',
- # None of files we build require these two headers.
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scoped_ptr.h',
- #'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_strtoint.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_windows.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.cc',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h',
- 'bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_windows.cc',
- 'bar/toolbar/cld/i18n/encodings/internal/encodings.cc',
- 'bar/toolbar/cld/i18n/encodings/proto/encodings.pb.h',
- 'bar/toolbar/cld/i18n/encodings/public/encodings.h',
- 'bar/toolbar/cld/i18n/languages/internal/languages.cc',
- 'bar/toolbar/cld/i18n/languages/proto/languages.pb.h',
- 'bar/toolbar/cld/i18n/languages/public/languages.h',
+ 'encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc',
+ # 'encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc',
+ # 'encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc',
+ 'encodings/compact_lang_det/win/cld_basictypes.h',
+ 'encodings/compact_lang_det/win/cld_commandlineflags.h',
+ 'encodings/compact_lang_det/win/cld_google.h',
+ 'encodings/compact_lang_det/win/cld_htmlutils.h',
+ 'encodings/compact_lang_det/win/cld_htmlutils_windows.cc',
+ 'encodings/compact_lang_det/win/cld_logging.h',
+ 'encodings/compact_lang_det/win/cld_macros.h',
+ 'encodings/compact_lang_det/win/cld_strtoint.h',
+ 'encodings/compact_lang_det/win/cld_unicodetext.cc',
+ 'encodings/compact_lang_det/win/cld_unicodetext.h',
+ 'encodings/compact_lang_det/win/cld_unilib.h',
+ 'encodings/compact_lang_det/win/cld_unilib_windows.cc',
+ 'encodings/compact_lang_det/win/cld_utf.h',
+ 'encodings/compact_lang_det/win/cld_utf8statetable.cc',
+ 'encodings/compact_lang_det/win/cld_utf8statetable.h',
+ 'encodings/compact_lang_det/win/cld_utf8utils.h',
+ 'encodings/compact_lang_det/win/cld_utf8utils_windows.cc',
+ 'encodings/internal/encodings.cc',
+ 'encodings/proto/encodings.pb.h',
+ 'encodings/public/encodings.h',
+ 'languages/internal/languages.cc',
+ 'languages/proto/languages.pb.h',
+ 'languages/public/languages.h',
'base/basictypes.h',
'base/build_config.h',
'base/casts.h',
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.cc b/third_party/cld/encodings/compact_lang_det/cldutil.cc
index 33d7c38..6da7fce 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.cc
+++ b/third_party/cld/encodings/compact_lang_det/cldutil.cc
@@ -3,15 +3,15 @@
// found in the LICENSE file.
#include <string>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil_dbg.h"
+#include "encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h"
+#include "encodings/compact_lang_det/utf8propletterscriptnum.h"
+#include "encodings/compact_lang_det/win/cld_commandlineflags.h"
+#include "encodings/compact_lang_det/win/cld_logging.h"
+#include "encodings/compact_lang_det/win/cld_unilib.h"
+#include "encodings/compact_lang_det/win/cld_utf.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
// Runtime routines for hashing, looking up, and scoring
// unigrams (CJK), bigrams (CJK), quadgrams, and octagrams.
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h b/third_party/cld/encodings/compact_lang_det/cldutil.h
index c1f4a20..7125343 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h
+++ b/third_party/cld/encodings/compact_lang_det/cldutil.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_CLDUTIL_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_CLDUTIL_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_CLDUTIL_H_
+#define ENCODINGS_COMPACT_LANG_DET_CLDUTIL_H_
#include <string>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/ext_lang_enc.h"
+#include "encodings/compact_lang_det/tote.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_commandlineflags.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
namespace cld {
@@ -1202,4 +1202,4 @@ namespace cld {
} // End namespace cld
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_CLDUTIL_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_CLDUTIL_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h b/third_party/cld/encodings/compact_lang_det/cldutil_dbg.h
index 6f991e6..30a23db 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h
+++ b/third_party/cld/encodings/compact_lang_det/cldutil_dbg.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_CLDUTIL_DBG_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_CLDUTIL_DBG_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_CLDUTIL_DBG_H_
+#define ENCODINGS_COMPACT_LANG_DET_CLDUTIL_DBG_H_
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil.h"
#include <string>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h"
+#include "encodings/compact_lang_det/ext_lang_enc.h"
+#include "encodings/compact_lang_det/tote.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_commandlineflags.h"
DECLARE_bool(dbgscore);
DECLARE_bool(dbglookup);
@@ -73,4 +73,4 @@ namespace cld {
} // End namespace cld
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_CLDUTIL_DBG_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_CLDUTIL_DBG_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg_empty.cc b/third_party/cld/encodings/compact_lang_det/cldutil_dbg_empty.cc
index cc2cdbf..3910462 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg_empty.cc
+++ b/third_party/cld/encodings/compact_lang_det/cldutil_dbg_empty.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h"
+#include "encodings/compact_lang_det/cldutil_dbg.h"
//#include <string>
//#include "base/logging.h"
@@ -12,7 +12,7 @@
//#include "util/utf8/unicodeprops.h"
//#include "util/utf8/unilib.h"
//#include "util/utf8/utf8statetable.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h"
+#include "encodings/compact_lang_det/win/cld_commandlineflags.h"
DEFINE_bool(dbgscore, false, "Print picture of score calculation");
DEFINE_bool(dbglookup, false, "Print every quad/uni lookup in score calc");
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.cc b/third_party/cld/encodings/compact_lang_det/compact_lang_det.cc
index 201a5af..e5af200 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.cc
+++ b/third_party/cld/encodings/compact_lang_det/compact_lang_det.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/compact_lang_det.h"
+#include "encodings/compact_lang_det/compact_lang_det_impl.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
// String is "code_version - data_scrape_date"
static const char* kDetectLanguageVersion = "V1.6 - 20081121";
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h b/third_party/cld/encodings/compact_lang_det/compact_lang_det.h
index bebfb90..16a3a1d 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h
+++ b/third_party/cld/encodings/compact_lang_det/compact_lang_det.h
@@ -45,11 +45,11 @@
// Arabic script.
//
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_H_
+#define ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_H_
-#include "bar/toolbar/cld/i18n/languages/public/languages.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "languages/public/languages.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
namespace cld {
struct CLDTableSummary;
@@ -203,4 +203,4 @@ namespace CompactLangDet {
const char* DetectLanguageVersion();
}; // End namespace CompactLangDet
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.cc b/third_party/cld/encodings/compact_lang_det/compact_lang_det_impl.cc
index 5e9fc56..ce2e521 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.cc
+++ b/third_party/cld/encodings/compact_lang_det/compact_lang_det_impl.cc
@@ -7,23 +7,23 @@
//#include <sys/time.h> // for gettimeofday
#include <string>
-#include "bar/toolbar/cld/i18n/encodings/lang_enc.h"
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h"
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil_dbg.h"
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/lang_enc.h"
+
+#include "encodings/compact_lang_det/compact_lang_det.h"
+#include "encodings/compact_lang_det/compact_lang_det_impl.h"
+#include "encodings/compact_lang_det/getonescriptspan.h"
+#include "encodings/compact_lang_det/letterscript_enum.h"
+#include "encodings/compact_lang_det/tote.h"
+#include "encodings/compact_lang_det/utf8propjustletter.h"
+#include "encodings/compact_lang_det/utf8propletterscriptnum.h"
+#include "encodings/compact_lang_det/utf8scannotjustletterspecial.h"
+
+#include "encodings/compact_lang_det/cldutil_dbg.h"
+
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_commandlineflags.h"
+#include "encodings/compact_lang_det/win/cld_google.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
// Linker supplies the right tables
extern const UTF8PropObj compact_lang_det_generated_ctjkvz_b1_obj;
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h b/third_party/cld/encodings/compact_lang_det/compact_lang_det_impl.h
index 91caab5..c727a63 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h
+++ b/third_party/cld/encodings/compact_lang_det/compact_lang_det_impl.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_IMPL_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_IMPL_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_IMPL_H_
+#define ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_IMPL_H_
-#include "bar/toolbar/cld/i18n/encodings/lang_enc.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/lang_enc.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
static const int kCLDFlagFinish = 1;
@@ -168,4 +168,4 @@ namespace CompactLangDetImpl {
int CheapSqueezeInplace(char* isrc, int srclen, int ichunksize);
}; // End namespace CompactLangDetImpl
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_IMPL_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_IMPL_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_unittest_small.cc b/third_party/cld/encodings/compact_lang_det/compact_lang_det_unittest_small.cc
index 29b78a3..c777f68 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_unittest_small.cc
+++ b/third_party/cld/encodings/compact_lang_det/compact_lang_det_unittest_small.cc
@@ -18,12 +18,12 @@
#include <string>
#include "testing/gtest/include/gtest/gtest.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/unittest_data.h"
+#include "encodings/compact_lang_det/compact_lang_det.h"
+#include "encodings/compact_lang_det/ext_lang_enc.h"
+#include "encodings/compact_lang_det/unittest_data.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h"
+#include "encodings/compact_lang_det/win/cld_commandlineflags.h"
+#include "encodings/compact_lang_det/win/cld_google.h"
DEFINE_bool(html, false, "Print language spans in HTML on stderr");
DEFINE_bool(detail, false, "Print incoming text to stderr");
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.cc b/third_party/cld/encodings/compact_lang_det/ext_lang_enc.cc
index e20fcda..c02baeb 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.cc
+++ b/third_party/cld/encodings/compact_lang_det/ext_lang_enc.cc
@@ -10,9 +10,9 @@
#include <stdio.h>
#include <string.h>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_strtoint.h"
+#include "encodings/compact_lang_det/ext_lang_enc.h"
+#include "encodings/compact_lang_det/win/cld_macros.h"
+#include "encodings/compact_lang_det/win/cld_strtoint.h"
// Language names above NUM_LANGUAGES
// These are also the C enum declared names
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h b/third_party/cld/encodings/compact_lang_det/ext_lang_enc.h
index e3354fc..3c97ff7 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/ext_lang_enc.h
+++ b/third_party/cld/encodings/compact_lang_det/ext_lang_enc.h
@@ -6,11 +6,11 @@
// It is current with Unicode 5.1 (March 2008)
//
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_EXT_LANG_ENC_H__
-#define I18N_ENCODINGS_COMPACT_LANG_DET_EXT_LANG_ENC_H__
+#ifndef ENCODINGS_COMPACT_LANG_DET_EXT_LANG_ENC_H__
+#define ENCODINGS_COMPACT_LANG_DET_EXT_LANG_ENC_H__
-#include "bar/toolbar/cld/i18n/languages/public/languages.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h"
+#include "languages/public/languages.h"
+#include "encodings/compact_lang_det/letterscript_enum.h"
// Leave a small gap after the base languages, so adding one or two is easy.
@@ -116,4 +116,4 @@ UnicodeLScript GetLScriptFromNumberOrName(const char* src);
// Merge together some languages, such as bo/hr/sr
Language NormalizeLanguage(Language lang);
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_EXT_LANG_ENC_H__
+#endif // ENCODINGS_COMPACT_LANG_DET_EXT_LANG_ENC_H__
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc
index 3314f53..3691d6c 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_cjkbis_0.cc
@@ -6,7 +6,7 @@
// From input file /tmp/langdet_v25_12cjk_sort.utf8
// See compact_lang_det.cc for usage
//
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil.h"
// Suppressed:
// az-Arab az-Cyrl ku-Latn tg-Arab za-Hani zzb-Latn zze-Latn zzh-Latn ru-Latn
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc
index ff984cc..c54bd5c 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz.cc
@@ -16,7 +16,7 @@
// multiplied by 16; offsets for 3-of-3 and 4-of-4 are
// relative +/-127 from previous state.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
#define X__ (kExitIllegalStructure)
#define RJ_ (kExitReject)
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz_0.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz_0.cc
index 9649cdf..51769f2 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz_0.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_ctjkvz_0.cc
@@ -14,7 +14,7 @@
// multiplied by 16; offsets for 3-of-3 and 4-of-4 are
// relative +/-127 from previous state.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
// Entire table has 1 state block of 64 entries
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc
index 9c761be..72d62c96 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_longwords8_0.cc
@@ -6,7 +6,7 @@
// From input file /tmp/input_10p_l8_sort.utf8
// See compact_lang_det.cc for usage
//
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil.h"
// Suppressed:
// az-Arab az-Cyrl ku-Latn tg-Arab za-Hani zzb-Latn zze-Latn zzh-Latn ru-Latn
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h
index 5cc5d034..bd68e06 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_meanscore.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_GENERATED_MEANSCORE_H__
-#define I18N_ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_GENERATED_MEANSCORE_H__
+#ifndef ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_GENERATED_MEANSCORE_H__
+#define ENCODINGS_COMPACT_LANG_DET_COMPACT_LANG_DET_GENERATED_MEANSCORE_H__
static const short kMeanScore[256 * 4] = {
1121, 0, 0, 0, 1082, 0, 0, 0, 1298, 0, 0, 0, 1601, 0, 0, 0,
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_0.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_0.cc
index 67fb6f86..92cbf03 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_0.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_0.cc
@@ -6,7 +6,7 @@
// From input file /tmp/good_quad_input4567_sort.utf8
// See compact_lang_det.cc for usage
//
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil.h"
// Suppressed:
// ms-Latn gl-Latn mt-Latn af-Latn eu-Latn mk-Cyrl fa-Arab
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc
index 05ebf72..81d8669 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_128.cc
@@ -6,7 +6,7 @@
// From input file /tmp/good_quad_input4567_sort.utf8
// See compact_lang_det.cc for usage
//
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil.h"
// Suppressed:
// ms-Latn gl-Latn mt-Latn af-Latn eu-Latn mk-Cyrl fa-Arab
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc
index c82cc05..1b6ea97 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_256.cc
@@ -6,7 +6,7 @@
// From input file /export/hda3/cld/text_2008_quads_plus_sort.utf8
// See compact_lang_det.cc for usage
//
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil.h"
// Included:
// af-Latn ar-Arab be-Cyrl bg-Cyrl bs-Latn ca-Latn cs-Latn cy-Latn da-Latn
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc
index 8736a95..d499f29 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc
+++ b/third_party/cld/encodings/compact_lang_det/generated/compact_lang_det_generated_quads_34rr.cc
@@ -7,7 +7,7 @@
// See compact_lang_det.cc for usage
//
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/cldutil.h"
+#include "encodings/compact_lang_det/cldutil.h"
// Included:
// af-Latn ar-Arab be-Cyrl bg-Cyrl bs-Latn ca-Latn cs-Latn cy-Latn da-Latn de-Latn el-Grek en-Latn es-Latn et-Latn fa-Arab fi-Latn fr-Latn ga-Latn hi-Deva hr-Latn hu-Latn id-Latn is-Latn is-Latn it-Latn iw-Hebr ja-Hani ko-Hani lt-Latn lv-Latn mk-Cyrl ms-Latn nl-Latn no-Latn pl-Latn pt-Latn ro-Latn ru-Cyrl sh-Cyrl sh-Latn sk-Latn sl-Latn sr-Cyrl sv-Latn sw-Latn th-Thai tl-Latn tr-Latn uk-Cyrl vi-Latn xxx-Latn yi-Hebr zh-Hani zh-TW
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc b/third_party/cld/encodings/compact_lang_det/getonescriptspan.cc
index 411d342..d947d21 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.cc
+++ b/third_party/cld/encodings/compact_lang_det/getonescriptspan.cc
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h"
+#include "encodings/compact_lang_det/getonescriptspan.h"
#include <stdio.h>
#include <string.h>
-#include "bar/toolbar/cld/i18n/encodings/lang_enc.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h"
-
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h"
+#include "encodings/lang_enc.h"
+#include "encodings/compact_lang_det/utf8propjustletter.h"
+#include "encodings/compact_lang_det/utf8propletterscriptnum.h"
+#include "encodings/compact_lang_det/utf8scannotjustletterspecial.h"
+
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_commandlineflags.h"
+#include "encodings/compact_lang_det/win/cld_google.h"
+#include "encodings/compact_lang_det/win/cld_htmlutils.h"
+#include "encodings/compact_lang_det/win/cld_unilib.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8utils.h"
static const Language GRAY_LANG = (Language)254;
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h b/third_party/cld/encodings/compact_lang_det/getonescriptspan.h
index 8dac8b4..936aab4 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/getonescriptspan.h
+++ b/third_party/cld/encodings/compact_lang_det/getonescriptspan.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_
+#define ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det_impl.h"
+#include "encodings/compact_lang_det/letterscript_enum.h"
+#include "encodings/compact_lang_det/compact_lang_det_impl.h"
namespace getone {
static const int kMaxScriptBuffer = 4096;
@@ -128,4 +128,4 @@ class LangScanner {
int* offset_rb_;
};
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_GETONESCRIPTSPAN_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.cc b/third_party/cld/encodings/compact_lang_det/letterscript_enum.cc
index 6224249..3e81f4e 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.cc
+++ b/third_party/cld/encodings/compact_lang_det/letterscript_enum.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h"
+#include "encodings/compact_lang_det/letterscript_enum.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h"
+#include "encodings/compact_lang_det/win/cld_logging.h"
static const char* kUnicodeLScriptNames[ULScript_NUM_SCRIPTS] = {
"Common",
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h b/third_party/cld/encodings/compact_lang_det/letterscript_enum.h
index 6a61c54..835d29a 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/letterscript_enum.h
+++ b/third_party/cld/encodings/compact_lang_det/letterscript_enum.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_LETTERSCRIPT_ENUM_H__
-#define I18N_ENCODINGS_COMPACT_LANG_DET_LETTERSCRIPT_ENUM_H__
+#ifndef ENCODINGS_COMPACT_LANG_DET_LETTERSCRIPT_ENUM_H__
+#define ENCODINGS_COMPACT_LANG_DET_LETTERSCRIPT_ENUM_H__
enum UnicodeLScript {
ULScript_Common,
@@ -96,4 +96,4 @@ const char* UnicodeLScriptName(const UnicodeLScript ls);
// It is a fatal error if ls is not a valid UnicodeLScript.
const char* UnicodeLScriptCode(const UnicodeLScript ls);
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_LETTERSCRIPT_ENUM_H__
+#endif // ENCODINGS_COMPACT_LANG_DET_LETTERSCRIPT_ENUM_H__
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.cc b/third_party/cld/encodings/compact_lang_det/subsetsequence.cc
index fc593d7..5ed5046 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.cc
+++ b/third_party/cld/encodings/compact_lang_det/subsetsequence.cc
@@ -44,10 +44,10 @@
***/
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h"
+#include "encodings/compact_lang_det/subsetsequence.h"
#include <stdio.h>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h"
+#include "encodings/compact_lang_det/win/cld_logging.h"
void DumpInts(const char* label, const int* v, int n) {
printf("%s ", label);
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h b/third_party/cld/encodings/compact_lang_det/subsetsequence.h
index 757b981..d2942df 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h
+++ b/third_party/cld/encodings/compact_lang_det/subsetsequence.h
@@ -4,11 +4,11 @@
// Remember a subset of a sequence of values, using a modest amount of memory
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_SUBSETSEQUENCE_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_SUBSETSEQUENCE_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_SUBSETSEQUENCE_H_
+#define ENCODINGS_COMPACT_LANG_DET_SUBSETSEQUENCE_H_
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_google.h"
class SubsetSequence {
@@ -41,4 +41,4 @@ class SubsetSequence {
COMPILE_ASSERT(kMaxSeq_ >= (kMaxLevel_ * 2 + 40), kMaxSeq__is_too_small);
};
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_SUBSETSEQUENCE_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_SUBSETSEQUENCE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence_unittest.cc b/third_party/cld/encodings/compact_lang_det/subsetsequence_unittest.cc
index 137547c..fe981b8 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence_unittest.cc
+++ b/third_party/cld/encodings/compact_lang_det/subsetsequence_unittest.cc
@@ -3,7 +3,7 @@
/*
#include "testing/base/public/gunit.h"
#include "testing/lib/strings/overrun_sensitive_memory_block.h"
-#include "cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/subsetsequence.h"
+#include "cld/encodings/compact_lang_det/subsetsequence.h"
// This always passes. It is just scaffolidng to exercise the subsequence
// facility, which is likely to get abandoned soon. dsites 2008.11.17
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.cc b/third_party/cld/encodings/compact_lang_det/tote.cc
index d93afe9..21087a8 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.cc
+++ b/third_party/cld/encodings/compact_lang_det/tote.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h"
+#include "encodings/compact_lang_det/tote.h"
#include <string.h> // memset
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h"
+#include "encodings/compact_lang_det/win/cld_logging.h"
// Take a set of <key, value> pairs and tote them up.
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h b/third_party/cld/encodings/compact_lang_det/tote.h
index 0702f6c..6d7b237 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/tote.h
+++ b/third_party/cld/encodings/compact_lang_det/tote.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_TOTE_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_TOTE_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_TOTE_H_
+#define ENCODINGS_COMPACT_LANG_DET_TOTE_H_
#include <stdio.h>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
// Take a set of <key, value> pairs and tote them up.
// After explicitly sorting, retrieve top key, value pairs
@@ -86,4 +86,4 @@ class ToteWithReliability {
////SubsetSequence ss_;
};
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_TOTE_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_TOTE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/unittest_data.h b/third_party/cld/encodings/compact_lang_det/unittest_data.h
index 2731f28..70cd302 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/unittest_data.h
+++ b/third_party/cld/encodings/compact_lang_det/unittest_data.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_COMPACT_LANG_DET_UNITTEST_DATA_H_
-#define I18N_ENCODINGS_COMPACT_LANG_DET_UNITTEST_DATA_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_UNITTEST_DATA_H_
+#define ENCODINGS_COMPACT_LANG_DET_UNITTEST_DATA_H_
const char* kTeststr_aa_Latn = " nagay tanito nagay tanto nagayna naharsi nahrur nake nala nammay nammay haytu nanu narig ne ni num numu o obare obe obe obisse oggole ogli olloyta ongorowe orbise othoga r rabe rade ra e rage rakub rasitte rasu reyta rog ruddi ruga s sa al bada sa ala";
const char* kTeststr_ab_Cyrl = " а зуа абзиара дақәшәоит ан лыбзиабара ахә амаӡам ауаҩы игәы иҭоу ихы иҿы ианубаалоит аҧҳәыс ҧшӡа ахацәа лышьҭоуп аҿаасҭа лара дрышьҭоуп";
@@ -190,4 +190,4 @@ const char* kTeststr_zzp_Latn = " a isplayda nformationia boutaa rivacypa ndaa s
const char* kTeststr_ms_close = "sukiyaki wikipedia bahasa melayu ensiklopedia bebas sukiyaki dari wikipedia bahasa melayu ensiklopedia bebas lompat ke navigasi gelintar sukiyaki sukiyaki hirisan tipis daging lembu sayur sayuran dan tauhu di dalam periuk besi yang dimasak di atas meja makan dengan cara rebusan sukiyaki dimakan dengan mence";
const char* kTeststr_id_close = "sukiyaki wikipedia indonesia ensiklopedia bebas berbahasa bebas berbahasa indonesia langsung ke navigasi cari untuk pengertian lain dari sukiyaki lihat sukiyaki irisan tipis daging sapi sayur sayuran dan tahu di dalam panci besi yang dimasak di atas meja makan dengan cara direbus sukiyaki dimakan dengan mence";
-#endif // I18N_ENCODINGS_COMPACT_LANG_DET_UNITTEST_DATA_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_UNITTEST_DATA_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h b/third_party/cld/encodings/compact_lang_det/utf8propjustletter.h
index a3dfc64..cac4dc7 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propjustletter.h
+++ b/third_party/cld/encodings/compact_lang_det/utf8propjustletter.h
@@ -10,7 +10,7 @@
#ifndef EXPERIMENTAL_USERS_DSITES_LANGDET_UTF8PROPJUSTLETTER_H__
#define EXPERIMENTAL_USERS_DSITES_LANGDET_UTF8PROPJUSTLETTER_H__
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
#define X__ (kExitIllegalStructure)
#define RJ_ (kExitReject)
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h b/third_party/cld/encodings/compact_lang_det/utf8propletterscriptnum.h
index 91f7074..91cfc40 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8propletterscriptnum.h
+++ b/third_party/cld/encodings/compact_lang_det/utf8propletterscriptnum.h
@@ -10,7 +10,7 @@
#ifndef EXPERIMENTAL_USERS_DSITES_LANGDET_UTF8PROPLETTERSCRIPTNUM_H__
#define EXPERIMENTAL_USERS_DSITES_LANGDET_UTF8PROPLETTERSCRIPTNUM_H__
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
#define X__ (kExitIllegalStructure)
#define RJ_ (kExitReject)
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h b/third_party/cld/encodings/compact_lang_det/utf8scannotjustletterspecial.h
index d44cbbf..bee1907 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/utf8scannotjustletterspecial.h
+++ b/third_party/cld/encodings/compact_lang_det/utf8scannotjustletterspecial.h
@@ -10,7 +10,7 @@
#ifndef EXPERIMENTAL_USERS_DSITES_LANGDET_UTF8SCANNOTJUSTLETTERSPECIAL_H__
#define EXPERIMENTAL_USERS_DSITES_LANGDET_UTF8SCANNOTJUSTLETTERSPECIAL_H__
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
#define X__ (kExitIllegalStructure)
#define RJ_ (kExitReject)
diff --git a/third_party/cld/encodings/compact_lang_det/win/cld_basictypes.h b/third_party/cld/encodings/compact_lang_det/win/cld_basictypes.h
new file mode 100644
index 0000000..b269fc5
--- /dev/null
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_basictypes.h
@@ -0,0 +1,10 @@
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_BASICTYPES_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_BASICTYPES_H_
+
+#include "base/basictypes.h"
+
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_BASICTYPES_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h b/third_party/cld/encodings/compact_lang_det/win/cld_commandlineflags.h
index 5ada614..04375bf 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_commandlineflags.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_commandlineflags.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_COMMANDLINEFLAGS_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_COMMANDLINEFLAGS_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_COMMANDLINEFLAGS_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_COMMANDLINEFLAGS_H_
#if !defined(CLD_WINDOWS)
@@ -25,4 +25,4 @@
#endif
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_COMMANDLINEFLAGS_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_COMMANDLINEFLAGS_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h b/third_party/cld/encodings/compact_lang_det/win/cld_google.h
index 6efad91..6354089 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_google.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_google.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_GOOGLE_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_GOOGLE_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_GOOGLE_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_GOOGLE_H_
#if !defined(CLD_WINDOWS)
@@ -15,4 +15,4 @@
#endif
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_GOOGLE_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_GOOGLE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h b/third_party/cld/encodings/compact_lang_det/win/cld_htmlutils.h
index 6656a71..c70b1cf 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_htmlutils.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_HTMLUTILS_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_HTMLUTILS_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_HTMLUTILS_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_HTMLUTILS_H_
// Src points to '&'
// Writes entity value to dst. Returns take(src), put(dst) byte counts
void EntityToBuffer(const char* src, int len, char* dst,
int* tlen, int* plen);
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_HTMLUTILS_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_HTMLUTILS_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_google3.cc b/third_party/cld/encodings/compact_lang_det/win/cld_htmlutils_google3.cc
index 0cec8a4..44889f9 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_google3.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_htmlutils_google3.cc
@@ -7,7 +7,7 @@
// This code is not actually used, it was copied here for the reference only.
// See cld_htmlutils_windows.cc for Windows version of this code.
-#include "cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h"
+#include "cld/encodings/compact_lang_det/win/cld_htmlutils.h"
#include "cld/third_party/utf/utf.h" // for runetochar
#include "cld/webutil/html/htmlutils.h" // for ReadEntity
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_windows.cc b/third_party/cld/encodings/compact_lang_det/win/cld_htmlutils_windows.cc
index e987a7a..60ae7c2 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils_windows.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_htmlutils_windows.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_htmlutils.h"
+#include "encodings/compact_lang_det/win/cld_htmlutils.h"
// Src points to '&'
// Writes entity value to dst. Returns take(src), put(dst) byte counts
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h b/third_party/cld/encodings/compact_lang_det/win/cld_logging.h
index f0a7365..541b158 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_logging.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_logging.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOGGING_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOGGING_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOGGING_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOGGING_H_
#if !defined(CLD_WINDOWS)
@@ -18,4 +18,4 @@
#endif
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOGGING_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_LOGGING_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h b/third_party/cld/encodings/compact_lang_det/win/cld_macros.h
index ab14eca..9c0a9f1 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_macros.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_macros.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_MACROS_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_MACROS_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_MACROS_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_MACROS_H_
#include "base/macros.h"
@@ -16,4 +16,4 @@
} \
while (0);
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_MACROS_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_MACROS_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_strtoint.h b/third_party/cld/encodings/compact_lang_det/win/cld_strtoint.h
index 004f1c2..242f74d 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_strtoint.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_strtoint.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
#if !defined(CLD_WINDOWS)
@@ -13,7 +13,7 @@
#include <stdlib.h>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
// This implementation is not as good as the one in base/strtoint.h,
// but it's sufficient for our purposes.
@@ -23,4 +23,4 @@ inline int32 strto32(const char *nptr, char **endptr, int base) {
#endif
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_STRTOINT_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.cc b/third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.cc
index 5b0e67e9..0430cd4 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h"
+#include "encodings/compact_lang_det/win/cld_unicodetext.h"
#include <string>
#include <vector> // to compile bar/common/component.h
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h"
+#include "encodings/compact_lang_det/compact_lang_det.h"
#include "base/string_util.h"
#include "unicode/normlzr.h"
#include "unicode/unistr.h"
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h b/third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.h
index c0d64aa..f79bad8 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNICODETEXT_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNICODETEXT_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNICODETEXT_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNICODETEXT_H_
-#include "bar/toolbar/cld/i18n/languages/public/languages.h"
+#include "languages/public/languages.h"
#include "unicode/utypes.h"
namespace CompactLangDet {
@@ -23,12 +23,12 @@ namespace CompactLangDet {
// Language counts only if it's detected in more than 20% of the text.
// [out, optional] error_code - set to 0 in case of success, Windows
// GetLastError() code otherwise. Pass NULL, if not interested in errors.
-// See bar/toolbar/cld/i18n/encodings/compact_lang_det/compact_lang_det.h,
+// See encodings/compact_lang_det/compact_lang_det.h,
// CompactLangDet::DetectLanguage() description for other input parameters
// description.
// Returns: Language enum.
// Returns NUM_LANGUAGES in case of any error.
-// See googleclient/bar/toolbar/cld/i18n/languages/internal/languages.cc
+// See googleclient/languages/internal/languages.cc
// for details.
Language DetectLanguageOfUnicodeText(
const CompactLangDet::DetectionTables* detection_tables,
@@ -37,4 +37,4 @@ Language DetectLanguageOfUnicodeText(
int* error_code);
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNICODETEXT_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNICODETEXT_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h b/third_party/cld/encodings/compact_lang_det/win/cld_unilib.h
index 14565da..5668f40 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_unilib.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNILIB_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNILIB_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNILIB_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNILIB_H_
namespace cld_UniLib {
@@ -12,4 +12,4 @@ int OneCharLen(const char* src);
} // namespace cld_UniLib
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNILIB_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UNILIB_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_google3.cc b/third_party/cld/encodings/compact_lang_det/win/cld_unilib_google3.cc
index 99d1816..99d1816 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_google3.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_unilib_google3.cc
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_windows.cc b/third_party/cld/encodings/compact_lang_det/win/cld_unilib_windows.cc
index 0e54aad..7014724 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib_windows.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_unilib_windows.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unilib.h"
+#include "encodings/compact_lang_det/win/cld_unilib.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
namespace cld_UniLib {
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf.h b/third_party/cld/encodings/compact_lang_det/win/cld_utf.h
index 28b268c..a0c73e7 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_utf.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF_H_
#if !defined(CLD_WINDOWS)
@@ -21,4 +21,4 @@ enum {
#endif
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.cc b/third_party/cld/encodings/compact_lang_det/win/cld_utf8statetable.cc
index 55be29a..58889e9 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_utf8statetable.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
// Return true if current Tbl pointer is within state0 range
// Note that unsigned compare checks both ends of range simultaneously
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h b/third_party/cld/encodings/compact_lang_det/win/cld_utf8statetable.h
index f4029b8..b2b3328 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_utf8statetable.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8STATETABLE_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8STATETABLE_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8STATETABLE_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8STATETABLE_H_
#if !defined(CLD_WINDOWS)
@@ -11,7 +11,7 @@
#else
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
// These four-byte entries compactly encode how many bytes 0..255 to delete
// in making a string replacement, how many bytes to add 0..255, and the offset
@@ -138,4 +138,4 @@ int UTF8GenericScan(const UTF8ScanObj* st,
#endif
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8STATETABLE_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8STATETABLE_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h b/third_party/cld/encodings/compact_lang_det/win/cld_utf8utils.h
index 6c7bbfc..3f2398f 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_utf8utils.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8UTILS_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8UTILS_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8UTILS_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8UTILS_H_
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
namespace cld {
@@ -19,4 +19,4 @@ int UTF8GenericScan(const UTF8ScanObj* st,
} // namespace cld
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8UTILS_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_CLD_UTF8UTILS_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_google3.cc b/third_party/cld/encodings/compact_lang_det/win/cld_utf8utils_google3.cc
index 016a5c6..6bb9de7 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_google3.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_utf8utils_google3.cc
@@ -4,7 +4,7 @@
// This code is not actually used, it was copied here for the reference only.
// See cld_htmlutils_windows.cc for Windows version of this code.
-#include "cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h"
+#include "cld/encodings/compact_lang_det/win/cld_utf8utils.h"
#include "cld/util/utf8/utf8statetable.h"
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_windows.cc b/third_party/cld/encodings/compact_lang_det/win/cld_utf8utils_windows.cc
index f1b6c03..9f43334 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils_windows.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/cld_utf8utils_windows.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8utils.h"
+#include "encodings/compact_lang_det/win/cld_utf8utils.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_utf8statetable.h"
+#include "encodings/compact_lang_det/win/cld_utf8statetable.h"
namespace cld {
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.cc b/third_party/cld/encodings/compact_lang_det/win/normalizedunicodetext.cc
index 5cb95d9..cb9faf3 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.cc
+++ b/third_party/cld/encodings/compact_lang_det/win/normalizedunicodetext.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.h"
+#include "encodings/compact_lang_det/win/normalizedunicodetext.h"
#include <tchar.h>
#include <windows.h>
#include <winnls.h>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
+#include "encodings/compact_lang_det/win/cld_scopedptr.h"
namespace {
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.h b/third_party/cld/encodings/compact_lang_det/win/normalizedunicodetext.h
index 14b5bbf..6336c30 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/normalizedunicodetext.h
+++ b/third_party/cld/encodings/compact_lang_det/win/normalizedunicodetext.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_NORMALIZEDUNICODETEXT_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_NORMALIZEDUNICODETEXT_H_
+#ifndef ENCODINGS_COMPACT_LANG_DET_WIN_NORMALIZEDUNICODETEXT_H_
+#define ENCODINGS_COMPACT_LANG_DET_WIN_NORMALIZEDUNICODETEXT_H_
#include <tchar.h>
#include <windows.h>
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_scopedptr.h"
+#include "encodings/compact_lang_det/win/cld_scopedptr.h"
#if (WINVER < 0x0600)
@@ -64,4 +64,4 @@ class NormalizedUnicodeText {
};
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_COMPACT_LANG_DET_WIN_NORMALIZEDUNICODETEXT_H_
+#endif // ENCODINGS_COMPACT_LANG_DET_WIN_NORMALIZEDUNICODETEXT_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/internal/encodings.cc b/third_party/cld/encodings/internal/encodings.cc
index 5cb5cb9..c8bf82e 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/internal/encodings.cc
+++ b/third_party/cld/encodings/internal/encodings.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/encodings/public/encodings.h"
+#include "encodings/public/encodings.h"
// We do not use it, just to please a compiler and minimize ported
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/lang_enc.h b/third_party/cld/encodings/lang_enc.h
index 24aaa04..0d2a4f1 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/lang_enc.h
+++ b/third_party/cld/encodings/lang_enc.h
@@ -19,11 +19,11 @@
// zero value. This assumption has been made and used.
//
-#ifndef I18N_ENCODINGS_LANG_ENC_H__
-#define I18N_ENCODINGS_LANG_ENC_H__
+#ifndef ENCODINGS_LANG_ENC_H__
+#define ENCODINGS_LANG_ENC_H__
-#include "bar/toolbar/cld/i18n/languages/public/languages.h"
-#include "bar/toolbar/cld/i18n/encodings/public/encodings.h"
+#include "languages/public/languages.h"
+#include "encodings/public/encodings.h"
// EncodingsForLanguage
@@ -251,4 +251,4 @@ const char* VisualTypeName(VisualType visualtype);
//
void InitLangEnc();
-#endif // I18N_ENCODINGS_LANG_ENC_H__
+#endif // ENCODINGS_LANG_ENC_H__
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/proto/encodings.pb.h b/third_party/cld/encodings/proto/encodings.pb.h
index 1a306b6..41d93f3 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/proto/encodings.pb.h
+++ b/third_party/cld/encodings/proto/encodings.pb.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_ENCODINGS_PROTO_ENCODINGS_PB_H_
-#define BAR_TOOLBAR_CLD_I18N_ENCODINGS_PROTO_ENCODINGS_PB_H_
+#ifndef ENCODINGS_PROTO_ENCODINGS_PB_H_
+#define ENCODINGS_PROTO_ENCODINGS_PB_H_
enum Encoding {
ISO_8859_1 = 0, // Teragram ASCII
@@ -166,4 +166,4 @@ enum Encoding {
// indicate the total number of Encodings.
};
-#endif // BAR_TOOLBAR_CLD_I18N_ENCODINGS_PROTO_ENCODINGS_PB_H_
+#endif // ENCODINGS_PROTO_ENCODINGS_PB_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/encodings/public/encodings.h b/third_party/cld/encodings/public/encodings.h
index 07bc610..3341f00 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/encodings/public/encodings.h
+++ b/third_party/cld/encodings/public/encodings.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_ENCODINGS_PUBLIC_ENCODINGS_H_
-#define I18N_ENCODINGS_PUBLIC_ENCODINGS_H_
+#ifndef ENCODINGS_PUBLIC_ENCODINGS_H_
+#define ENCODINGS_PUBLIC_ENCODINGS_H_
// This interface defines the Encoding enum and various functions that
// depend only on Encoding values.
@@ -23,7 +23,7 @@
#ifndef SWIG
-#include "bar/toolbar/cld/i18n/encodings/proto/encodings.pb.h"
+#include "encodings/proto/encodings.pb.h"
// We must have this for compatibility.
// COMMENTED OUT TO REDUCE DEPENDENCIES ON GOOGLE3 CODE
@@ -298,4 +298,4 @@ Encoding PreferredWebOutputEncoding(Encoding enc);
// support InitGoogle.
void InitEncodings();
-#endif // I18N_ENCODINGS_PUBLIC_ENCODINGS_H_
+#endif // ENCODINGS_PUBLIC_ENCODINGS_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/languages/internal/languages.cc b/third_party/cld/languages/internal/languages.cc
index 8fe0b84..3bb50ee 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/languages/internal/languages.cc
+++ b/third_party/cld/languages/internal/languages.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "bar/toolbar/cld/i18n/languages/public/languages.h"
+#include "languages/public/languages.h"
#include "base/string_util.h"
-#include "bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_basictypes.h"
+#include "encodings/compact_lang_det/win/cld_basictypes.h"
Language default_language() {return ENGLISH;}
@@ -27,12 +27,11 @@ static const LanguageInfo kLanguageInfoTable[] = {
{ "FINNISH", "fi", "fin", NULL},
{ "FRENCH", "fr", "fre", NULL},
{ "GERMAN", "de", "ger", NULL},
- // NB: we use "iw" for Hebrew instead of the more recent "he"
- { "HEBREW", "iw", "heb", NULL},
+ { "HEBREW", "he", "heb", NULL},
{ "ITALIAN", "it", "ita", NULL},
{ "Japanese", "ja", "jpn", NULL},
{ "Korean", "ko", "kor", NULL},
- { "NORWEGIAN", "no", "nor", NULL},
+ { "NORWEGIAN", "nb", "nor", NULL},
{ "POLISH", "pl", "pol", NULL},
{ "PORTUGUESE", "pt", "por", NULL},
{ "RUSSIAN", "ru", "rus", NULL},
@@ -58,7 +57,9 @@ static const LanguageInfo kLanguageInfoTable[] = {
{ "SERBIAN", "sr", "scc", NULL},
{ "IRISH", "ga", "gle", NULL},
{ "GALICIAN", "gl", "glg", NULL},
- { "TAGALOG", "tl", "tgl", NULL},
+ // Impossible to tell Tagalog from Filipino at the moment.
+ // Use ISO 639-2 code for Filipino here.
+ { "TAGALOG", NULL, "fil", NULL},
{ "TURKISH", "tr", "tur", NULL},
{ "UKRAINIAN", "uk", "ukr", NULL},
{ "HINDI", "hi", "hin", NULL},
diff --git a/third_party/cld/bar/toolbar/cld/i18n/languages/proto/languages.pb.h b/third_party/cld/languages/proto/languages.pb.h
index 7dca772..87dca9f 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/languages/proto/languages.pb.h
+++ b/third_party/cld/languages/proto/languages.pb.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BAR_TOOLBAR_CLD_I18N_LANGUAGES_PROTO_LANGUAGES_PB_H_
-#define BAR_TOOLBAR_CLD_I18N_LANGUAGES_PROTO_LANGUAGES_PB_H_
+#ifndef LANGUAGES_PROTO_LANGUAGES_PB_H_
+#define LANGUAGES_PROTO_LANGUAGES_PB_H_
enum Language {
ENGLISH = 0,
@@ -176,4 +176,4 @@ enum Language {
// at the top of this enum.
};
-#endif // BAR_TOOLBAR_CLD_I18N_LANGUAGES_PROTO_LANGUAGES_PB_H_
+#endif // LANGUAGES_PROTO_LANGUAGES_PB_H_
diff --git a/third_party/cld/bar/toolbar/cld/i18n/languages/public/languages.h b/third_party/cld/languages/public/languages.h
index c518e1b..9d67f6c 100644
--- a/third_party/cld/bar/toolbar/cld/i18n/languages/public/languages.h
+++ b/third_party/cld/languages/public/languages.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef I18N_LANGUAGES_PUBLIC_LANGUAGES_H_
-#define I18N_LANGUAGES_PUBLIC_LANGUAGES_H_
+#ifndef LANGUAGES_PUBLIC_LANGUAGES_H_
+#define LANGUAGES_PUBLIC_LANGUAGES_H_
// This interface defines the Language enum and functions that depend
// only on Language values.
@@ -14,7 +14,7 @@
#ifndef SWIG
// Language enum defined in languages.proto
// Also description on how to add languages.
-#include "bar/toolbar/cld/i18n/languages/proto/languages.pb.h"
+#include "languages/proto/languages.pb.h"
// We need this for compatibility:
// - The Language enum in the default namespace.
@@ -376,4 +376,4 @@ bool LanguageCodeToUnderscoreForm(const char* lang_code,
bool AlwaysPutInExpectedRestrict(const char *tld, Language *expected_language);
-#endif // I18N_LANGUAGES_PUBLIC_LANGUAGES_H_
+#endif // LANGUAGES_PUBLIC_LANGUAGES_H_