clear,great!!!
On 10月11日, 上午4时55分, Brett Wilson <[email protected]> wrote:
> I finished moving the last bit of string stuff in preparation for
> separating ICU from base. All ICU and related utilities have moved to
> src/base/i18n. The rest of base should not depend on base/i18n because
> it will be a separate library, but base/i18n can depend on the rest of
> base.
>
> The core UTF8/UTF16/Wide conversion functions have been added to a new
> file: base/utf_string_conversions.h. This file doesn't use ICU, but
> rather a few ICU functions and macros I pulled out into
> base/third_party/icu.
>
> Currently, base/string_util.h includes base/utf_string_conversions.h
> and is likely to stay this way since nobody wants to change all of the
> files in the project. But if you write a new file or are updating the
> includes for an existing one, think about whether you need all of
> string_util or just the UTF conversion functions. The UTF conversion
> functions will almost never change, so you won't have to recompile
> your file when Bill S. Preston, Esq. adds
> SeparateStringIntoBitsAndInterpretEveryThirdPartAsAnInt64() to
> string_util.
>
> base/sys_string_conversions no longer includes SysUTF8ToWide and
> friends since there's no longer any point for those.
> sys_string_conversions contains only functions for converting to the
> system's native multibyte encoding (which you'll almost never need).
>
> The more advanced conversion functions that use ICU are in
> base/i18n/icu_string_conversions.h. You will have to include this file
> explicitly if you need them. This is WideToCodepage and friends for
> general character set conversion. It's rare to need this since you
> should be using Unicode.
>
> The final part I haven't done is make a separate base_i18n project
> that clients wanting ICU and related stuff will link to. This will
> replace base_gfx which has no purpose since I moved all the Skia and
> libpng/jpeg dependencies to app. This will allow clients to decide if
> they really need internationalization support.
>
> =============================
> I'm adding something, where does it go?
>
> First, please consider putting it inside your component's directory.
> When everybody adds all their crap to base, it ends up that nobody can
> find anything and the build is more interdependent. If you're not
> actually sharing anything between toplevel projects, it shouldn't be
> in base.
>
> Second, consider putting it in src/app. App is "the stuff you need to
> build a Windowed application," whereas src/base is "the stuff you need
> to build *any* application." Think of some random daemon or library on
> ChromeOS. It should link to base but not app. Is your stuff useful to
> every client executable, or just "applications" dealing with the
> windowing system, clipboard, drag & drop, etc.? Note also that
> WebKit/glue and test_shell can now depend on app, which makes it easy
> to not put stuff in base now. It's assumed anything in app can depend
> on ICU (base/i18n) since real applications will be internationalized.
>
> Put it in base if it really should be linked in with every Google
> client application, the crash reporter app, all ChromeOS daemons and
> login manager, etc. This shouldn't be that much stuff! If it needs
> ICU, put it in base/i18n. If it doesn't, put it in base or the
> appropriate subdirectory.
>
> Brett
--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected]
View archives, change email options, or unsubscribe:
http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---