Hello mpcomplete,

I'd like you to do a code review.  Please execute
        g4 diff -c 8421912

or point your web browser to
        http://mondrian/8421912

to review the following code:

Change 8421912 by [EMAIL PROTECTED] on 2008/09/29 11:53:53 *pending*

        Remove browser utils from chrome directory and integrate the difference 
into the npapi version.
        
        R=mpcomplete
        [EMAIL PROTECTED]
        DELTA=148  (10 added, 137 deleted, 1 changed)
        OCL=8421912

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/chrome/browser_utils.cc#1 
delete
... //depot/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc#5 
edit

148 delta lines: 10 added, 137 deleted, 1 changed

Also consider running:
        g4 lint -c 8421912

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8421912 by [EMAIL PROTECTED] on 2008/09/29 11:53:53 *pending*

        Remove browser utils from chrome directory and integrate the difference 
into the npapi version.

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/chrome/browser_utils.cc#1 
delete
... //depot/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc#5 
edit

==== //depot/googleclient/gears/opensource/gears/base/chrome/browser_utils.cc#1 
- None ====
# action=delete type=text
==== //depot/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc#5 
- c:\src-gears3/googleclient/gears/opensource/gears/base/npapi/browser_utils.cc 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/npapi/browser_utils.cc     
2008-09-29 11:07:23.000000000 -0700
+++ googleclient/gears/opensource/gears/base/npapi/browser_utils.cc     
2008-09-29 11:55:38.000000000 -0700
@@ -27,7 +27,12 @@
 
 #include <stack>
 
+#if BROWSER_CHROME
+#include "gears/base/chrome/browsing_context_cr.h"
+#include "gears/base/chrome/module_cr.h"
+#else
 #include "gears/base/common/browsing_context.h"
+#endif
 #include "gears/base/common/js_types.h"
 #include "gears/base/common/string_utils.h"
 #include "gears/base/common/thread_locals.h"
@@ -37,7 +42,7 @@
 extern std::string16 g_user_agent;  // Defined in base/npapi/npp_bindings.cc
 
 typedef std::stack<JsCallContext*> JsCallStack;
-const ThreadLocals::Slot kJsCallStackKey = ThreadLocals::Alloc();
+static const ThreadLocals::Slot kJsCallStackKey = ThreadLocals::Alloc();
 
 static void DeleteJsCallStack(void *context) {
   JsCallStack *call_stack = reinterpret_cast<JsCallStack*>(context);
@@ -125,8 +130,13 @@
 
 bool BrowserUtils::GetPageBrowsingContext(
    JsContextPtr context, scoped_refptr<BrowsingContext> *browsing_context) {
+#if BROWSER_CHROME
+  CPBrowsingContext cp_context = CP::GetBrowsingContext(context);
+  browsing_context->reset(new CRBrowsingContext(cp_context));
+#else
   // TODO(mpcomplete): implement me.
   browsing_context->reset();
+#endif
   return true;
 }
 

Reply via email to