[chromium-dev] Is there a way to change the order in which individual unit tests are run?

2009-06-05 Thread Book'em Dano

As an example, let's say I'm making some changes to CommandLine. As
part of these changes, I'm wanting to run base_unittests. However,
it's super annoying that I have to wait a few minutes while the other
unit tests within this suite are run before the CommandLine unit test
is hit. Is there a way to change this order _temporarily_ without
excluding them from the project via Visual Studio?

-Daniel
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Does anyone have objections to adding a GetSwitchValues() accessor to CommandLine?

2009-06-03 Thread Book'em Dano

For Chromium that may be the case, but there are other projects that
are also using the CommandLine class that may/do have other reqs.

On Jun 3, 5:02 am, Thomas Van Lenten  wrote:
> On Wed, Jun 3, 2009 at 12:06 AM, Book'em Dano  wrote:
>
> > Does anyone have objections to including such a function? It would
> > just return a copy of std::map switches_;
>
> > I'd like to add such a function so that I can iterate over the command
> > line args (both switches and loose values) and validate that only
> > expected values are present.
>
> How do you decide what is "unexpected"?  The current system allows any part
> of the code to define and use switches.
>
> TVL
>
>
>
>
>
> > -D
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Does anyone have objections to adding a GetSwitchValues() accessor to CommandLine?

2009-06-02 Thread Book'em Dano

Sure. that woudl work too. I'm kinda curious why this was removed in
the first place. If i recall correctly, we used to have such a method.

On Jun 2, 9:09 pm, Amanda Walker  wrote:
> Would an iterator method on CommandLine serve the same purpose?  It seems
> like that could work without having to make a copy...
> --Amanda
>
>
>
> On Wed, Jun 3, 2009 at 12:06 AM, Book'em Dano  wrote:
>
> > Does anyone have objections to including such a function? It would
> > just return a copy of std::map switches_;
>
> > I'd like to add such a function so that I can iterate over the command
> > line args (both switches and loose values) and validate that only
> > expected values are present.
>
> > -D
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Does anyone have objections to adding a GetSwitchValues() accessor to CommandLine?

2009-06-02 Thread Book'em Dano

Does anyone have objections to including such a function? It would
just return a copy of std::map switches_;

I'd like to add such a function so that I can iterate over the command
line args (both switches and loose values) and validate that only
expected values are present.

-D


--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Are we now using Visual Studio 2008?

2009-05-27 Thread Book'em Dano

You said Currently gyp is detecting and emitting 2005/2008 based
on what you have installed.

When you say gyp, I'm assuming you mean that some program is
interpreting the *.gyp files (e.g. chrome.gyp) and then using these
files to generate the project files? What program is doing this and
how do I invoke it? I was only able to find details of the GYP syntax
on the wiki, but nothing on how these files are actually converted
into vcproj files.

Thanks,
Daniel


On May 27, 1:54 pm, Bradley Nelson  wrote:
> So sverrir's suggestion is right idea.
> Currently gyp is detecting and emitting 2005/2008 based on what you
> have installed.
> Once
> chrome.sln is eaten this should allow people to use either, but
> currently if you have 2008 installed it
> changes lower level stuff but the checked in sln is still at 2005.
> A more thought out default might have been prudent, but it will be moot
> shortly.
>
> -BradN
>
> On Wed, May 27, 2009 at 1:48 PM, Peter Kasting wrote:
>
> > On Wed, May 27, 2009 at 1:46 PM, Book'em Dano wrote:
>
> >> The version of chrome.sln on the trunk (http://src.chromium.org/viewvc/
> >> chrome/trunk/src/chrome/chrome.sln?view=markup<http://src.chromium.org/viewvc/%0Achrome/trunk/src/chrome/chrome.sln?...>)
> >> contains
> >> Microsoft Visual Studio Solution File, Format Version 9.00 >> snip>
>
> >> This would seem to indicate VS 2008, no?
>
> > No, that's VS 2005.
>
> > You should svn diff chrome.sln.
>
> > PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Are we now using Visual Studio 2008?

2009-05-27 Thread Book&#x27;em Dano

The version of chrome.sln on the trunk (http://src.chromium.org/viewvc/
chrome/trunk/src/chrome/chrome.sln?view=markup) contains
Microsoft Visual Studio Solution File, Format Version 9.00

This would seem to indicate VS 2008, no?

On May 27, 1:43 pm, Peter Kasting  wrote:
> On Wed, May 27, 2009 at 1:36 PM, Book'em Dano  wrote:
> > Did I miss the announcement that we were going to VS
> > 2008?
>
> Not that I know of.  Perhaps your local copy is modified somehow?
>
> PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Are we now using Visual Studio 2008?

2009-05-27 Thread Book&#x27;em Dano

I've been working on a private branch for a while now and recently did
a sync. When I try to open chrome.sln in VS 2005, it complains that it
can't parse version numbers. Apparently the project files have been
upgraded to 9.0? Did I miss the announcement that we were going to VS
2008?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: MessageLoop::PostTask Question

2009-05-25 Thread Book&#x27;em Dano

yeah, I've actually been doing what Evan mentioned, but I'm running
into the lifetime issues (as he points out). That's actually what
prompted this post. Sounds like I should step back and reconsider the
design. Thanks for the responses guys!

On May 25, 3:48 pm, Aaron Boodman  wrote:
> On Mon, May 25, 2009 at 3:44 PM, Evan Martin  wrote:
> > If you're trying to catch a notification that needs to get to a worker
> > thread, a pattern we use elsewhere is to have an object that lives on
> > the UI thread that gets the notification then makes an async call over
> > to the worker thread.  You have to be careful about the relative
> > lifetimes of the objects involved, but it can be done.  Take a look at
> > the greasemonkey master class (I think?) or maybe the FileWatcher
> > class.
>
> ChromeURLRequestContext is another good example of this, I think.
>
> - a
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] MessageLoop::PostTask Question

2009-05-25 Thread Book&#x27;em Dano

MessageLoop::PostTask() runs a method asynchronously within a
destination thread. The problem I have is that I'd like to execute
this code (on the destination thread) synchronously.

More details: I'm using a NotificationService on a worker thread
(which uses TLS), so I need to proxy the call to add/remove observers
from the main thread over to the worker thread. To do this, I'm
calling PostTask to invoke the add/remove observer code on the work
thread. I want/need to block the main thread though until the add/
remove observer code has actually been processed by the worker
thread.

What is the recommended way to do this?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Chrome Views w/o BrowserProcessImpl?

2009-04-24 Thread Book&#x27;em Dano

Okay, thanks Ben

On Apr 24, 7:38 pm, "Ben Goodger (Google)"  wrote:
> At present views has some dependencies on some other parts of the
> browser infrastructure but I plan to sever a lot of this in the coming
> month or two.
>
> -Ben
>
> On Fri, Apr 24, 2009 at 7:36 PM, Book'em Dano  wrote:
>
> > Is it possible to use views without an instance of BrowserProcess or
> > are they very tightly coupled?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Chrome Views w/o BrowserProcessImpl?

2009-04-24 Thread Book&#x27;em Dano

Is it possible to use views without an instance of BrowserProcess or
are they very tightly coupled?
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Can you use ASCII codes in the GRD files??

2009-04-20 Thread Book&#x27;em Dano

Say I wanted to add a string with contents "Hello -- World" (that's a
long dash) and also  the TM (trademark) symbol. I was hoping I
could add something like the following to the grd file:

Hello–World™

But this doesn't seem to produce the results I expected. When I
extract the string from the string table using l10n_util::GetString(),
what i get back is just "Hello World" (i.e. without the symbols).

Is this supported? Should I instead be using the $1, $2 placeholders
and populating the – ™ myself after lookup?

Thanks,
Bookem
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Need help with URL processing

2009-04-20 Thread Book&#x27;em Dano

Perfect. that did the job. Thanks guys!

On Apr 20, 11:14 am, Evan Martin  wrote:
> On Mon, Apr 20, 2009 at 10:53 AM, Wan-Teh Chang  wrote:
>
> > You can look at url_request.{h,cc}, which is in the net module.
>
> > You can also look at the next layer up, which has two sets of files:
> > 1. resource_dispatcher_host.{h,cc}: I think this is exactly what you
> > wanted, but it doesn't cover the network traffic generated by the next
> > set of files.
>
> This document may help explain where resource_dispatcher_host fits in:
>  http://dev.chromium.org/developers/design-documents/multi-process-res...
> It gets all page-level requests for URLs, but no browser-level
> requests (such as the phishing databases or the omnibox suggestions).
>
> > 2. url_fetcher.{h,cc}: I believe this covers the network traffic generated
> > by Chromium itself, such as talking to the safe browsing server, the
> > search suggestion server, etc.
>
> This is right.  URLFetcher and ResourceDispatcherHost are both built
> on URLRequest.
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Need help with URL processing

2009-04-20 Thread Book&#x27;em Dano

I'm working on a project that needs to log (and possibly filter...e.g.
block file downloads from specific sites, etc) network traffic. This
functionality should be invoked not only for content typed directly in
the omnibar, but also clicked links, javascript popups, etc. Ideally
there's a central function that all requests get routed to, but I'm
not sure if I should be looking in the |net| package or somewhere
higher up. Could someone please point me in the right direction.

Ideally, there's a central function that all such requests get routed
to, but that's high enough up that I still have sufficient context
info (e.g. URL, url scheme, etc) to make intelligent decisions.

Thanks,
Bookem
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Help needed taking a snapshot of a window and saving as thumbnail.

2009-03-31 Thread Book&#x27;em Dano

Never mind. I figured it out.

On Mar 31, 1:25 pm, "Book'em Dano"  wrote:
> Is there any code already written for converting a a HWND or
> views::WidgetWin into a  PNG? If not, any suggestions on how to
> do this? I want to be able to take snapshots of various windows and
> then save them to disk.
>
> Thanks guys,
> Danny
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Help needed taking a snapshot of a window and saving as thumbnail.

2009-03-31 Thread Book&#x27;em Dano

Is there any code already written for converting a a HWND or
views::WidgetWin into a  PNG? If not, any suggestions on how to
do this? I want to be able to take snapshots of various windows and
then save them to disk.

Thanks guys,
Danny
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Sandbox Interception Design

2009-03-27 Thread Book&#x27;em Dano

I'd like to better understand how the interception mechanism works. Is
it using IAT rewriting?

On Mar 27, 2:18 pm, Ricardo Vargas  wrote:
> I guess we'll have to update the documentation with a few things that were
> left behind.
> In the mean time, do you have something specific in mind?
>
> On Fri, Mar 27, 2009 at 1:59 PM, Brett Wilson  wrote:
>
> > On Fri, Mar 27, 2009 at 1:50 PM, Book'em Dano 
> > wrote:
>
> > > At the top of sandbox\src\interception.h, it refers the reader to:
> > >http://wiki/Main/ChromeSandboxInterceptionDesign. Does anyone know
> > > where this document can be found?
>
> > > The sandbox info on
> >http://dev.chromium.org/developers/design-documents/sandbox
> > > is too high level...I want to find out more details about the
> > > interception framework and design.
>
> > The internal doc is the same as the external one you found, so there
> > probably isn't one more detailed (but I don't know for sure).
>
> > Brett
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Sandbox Interception Design

2009-03-27 Thread Book&#x27;em Dano

At the top of sandbox\src\interception.h, it refers the reader to:
http://wiki/Main/ChromeSandboxInterceptionDesign. Does anyone know
where this document can be found?

The sandbox info on http://dev.chromium.org/developers/design-documents/sandbox
is too high level...I want to find out more details about the
interception framework and design.

Thanks,
D
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Does JSONStringValueSerializer expect UTF8?

2009-03-24 Thread Book&#x27;em Dano

Awesome. Thanks PK and SC for your prompt replies. I was unaware that
general pattern in the code is that narrow strings are UTF-8. Good to know.

On Mar 24, 9:30 pm, Peter Kasting  wrote:
> On Tue, Mar 24, 2009 at 8:57 PM, Book'em Dano  wrote:
> > Hi guys,
>
> > I notice that JSONStringValueSerializer in chrome\common takes a
> > narrow string. It expects a UTF8 encoded string, right (i.e. it
> > doesn't have to be ASCII only)?
>
> The general pattern in the code is that narrow strings are UTF-8 unless
> explicitly commented some other way (with ASCII usually being that commented
> exception).  So I would expect that yes, this takes UTF-8.
>
> PK
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Does JSONStringValueSerializer expect UTF8?

2009-03-24 Thread Book&#x27;em Dano

Hi guys,

I notice that JSONStringValueSerializer in chrome\common takes a
narrow string. It expects a UTF8 encoded string, right (i.e. it
doesn't have to be ASCII only)?

Thanks,
D
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: Quick question about struct initialization

2009-03-22 Thread Book&#x27;em Dano

Sorry if I wasn't clear enough, but that's actually what my question
is.

What's the need/point of calling memset if initialization via " = {0};
" works just as well. Are you saying that it doesn't? Or are you
saying that you're not quite sure, and to be on the safe side, do
both. I'd like to avoid doing work (even if only 1 a liner) that isn't
needed. i'd like to put this to rest once and for all, so if anyone
knows, could please help me out here.

Cheers,
Danny

On Mar 22, 5:23 am, Smita  wrote:
> It works fine with gcc.
> However, you might want to initialize the entire array to 0 using a
> memset.
>
> Smita
>
> On Mar 21, 10:23 pm, "Book'em Dano"  wrote:
>
> > Can someone please confirm whether it's safe to initialize a POD
> > struct using:
>
> > MyStruct blat = {0};
>
> > with gcc on Linux/Mac? I know this works fine with the VC compiler,
> > but I dont have gcc handy.
>
> > Thanks,
> > D
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Quick question about struct initialization

2009-03-21 Thread Book&#x27;em Dano

Can someone please confirm whether it's safe to initialize a POD
struct using:

MyStruct blat = {0};

with gcc on Linux/Mac? I know this works fine with the VC compiler,
but I dont have gcc handy.

Thanks,
D
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---