Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 8508060: Add functionality to the GCAPI to detect when Chrome was last run. (Closed)

Created:
9 years, 1 month ago by robertshield
Modified:
6 years, 3 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Add functionality to the GCAPI to detect when Chrome was last run. Also fix a buffer overrun while I'm here. Also, fix up the export definitions to use the more-sane .def file approach. BUG=103909, 88622 TEST=Invoke the GoogleChromeDaysSinceLastRun() export on GCAPI.dll, observe that it reports the number of days since Chrome was last run. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109919

Patch Set 1 #

Total comments: 27

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 6

Patch Set 4 : '' #

Total comments: 8

Patch Set 5 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -32 lines) Patch
M chrome/chrome_installer.gypi View 1 2 4 chunks +12 lines, -1 line 0 comments Download
M chrome/installer/gcapi/gcapi.h View 1 4 chunks +17 lines, -10 lines 0 comments Download
M chrome/installer/gcapi/gcapi.cc View 1 2 3 4 9 chunks +81 lines, -18 lines 0 comments Download
A chrome/installer/gcapi/gcapi.def View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/installer/gcapi/gcapi_last_run_test.cc View 1 2 3 1 chunk +136 lines, -0 lines 2 comments Download
M chrome/installer/gcapi/gcapi_test.cc View 2 chunks +7 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (1 generated)
robertshield
Go nuts, but please keep in mind that while there are several unkosher things about ...
9 years, 1 month ago (2011-11-11 16:12:55 UTC) #1
Roger Tawa OOO till Jul 10th
lgtm
9 years, 1 month ago (2011-11-11 16:39:23 UTC) #2
grt (UTC plus 2)
Nice catch on the buffer overrun! LG overall. http://codereview.chromium.org/8508060/diff/1/chrome/chrome_installer.gypi File chrome/chrome_installer.gypi (right): http://codereview.chromium.org/8508060/diff/1/chrome/chrome_installer.gypi#newcode11 chrome/chrome_installer.gypi:11: ['OS=="win"', ...
9 years, 1 month ago (2011-11-11 17:01:01 UTC) #3
robertshield
Thanks for your comments, please take another look. Also I can't take credit for spotting ...
9 years, 1 month ago (2011-11-12 05:25:38 UTC) #4
robertshield
Oh, and I also cleaned up the DLL export definitions a bit, since they were ...
9 years, 1 month ago (2011-11-12 05:40:35 UTC) #5
grt (UTC plus 2)
Apologies in advance for the yak hair. http://codereview.chromium.org/8508060/diff/1/chrome/chrome_installer.gypi File chrome/chrome_installer.gypi (right): http://codereview.chromium.org/8508060/diff/1/chrome/chrome_installer.gypi#newcode11 chrome/chrome_installer.gypi:11: ['OS=="win"', { ...
9 years, 1 month ago (2011-11-14 14:24:09 UTC) #6
robertshield
Thanks, PTAL. http://codereview.chromium.org/8508060/diff/10001/chrome/installer/gcapi/gcapi.cc File chrome/installer/gcapi/gcapi.cc (right): http://codereview.chromium.org/8508060/diff/10001/chrome/installer/gcapi/gcapi.cc#newcode489 chrome/installer/gcapi/gcapi.cc:489: RegKey client_state(reg_data[i].hive, reg_data[i].path, KEY_QUERY_VALUE); On 2011/11/14 14:24:09, ...
9 years, 1 month ago (2011-11-14 15:13:49 UTC) #7
grt (UTC plus 2)
i'm sorry, i couldn't resist. let me know if you want me to write the ...
9 years, 1 month ago (2011-11-14 16:24:47 UTC) #8
grt (UTC plus 2)
LGTM with the header removal from my previous comment.
9 years, 1 month ago (2011-11-14 16:29:27 UTC) #9
robertshield
Thanks. http://codereview.chromium.org/8508060/diff/16001/chrome/installer/gcapi/gcapi.cc File chrome/installer/gcapi/gcapi.cc (right): http://codereview.chromium.org/8508060/diff/16001/chrome/installer/gcapi/gcapi.cc#newcode21 chrome/installer/gcapi/gcapi.cc:21: #include <algorithm> On 2011/11/14 16:24:47, grt wrote: > ...
9 years, 1 month ago (2011-11-14 16:31:56 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/robertshield@chromium.org/8508060/15002
9 years, 1 month ago (2011-11-14 16:33:57 UTC) #11
commit-bot: I haz the power
Presubmit check for 8508060-15002 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 1 month ago (2011-11-14 16:34:06 UTC) #12
Nico
https://codereview.chromium.org/8508060/diff/15002/chrome/installer/gcapi/gcapi_last_run_test.cc File chrome/installer/gcapi/gcapi_last_run_test.cc (right): https://codereview.chromium.org/8508060/diff/15002/chrome/installer/gcapi/gcapi_last_run_test.cc#newcode33 chrome/installer/gcapi/gcapi_last_run_test.cc:33: L"hkcu_override\\%ls", ASCIIToWide(guid::GenerateGUID())); ASCIIToWide returns a wstring, you want to ...
6 years, 3 months ago (2014-08-29 22:08:46 UTC) #14
robertshield
6 years, 3 months ago (2014-08-30 00:55:56 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/8508060/diff/15002/chrome/installer/gcapi/gca...
File chrome/installer/gcapi/gcapi_last_run_test.cc (right):

https://codereview.chromium.org/8508060/diff/15002/chrome/installer/gcapi/gca...
chrome/installer/gcapi/gcapi_last_run_test.cc:33: L"hkcu_override\\%ls",
ASCIIToWide(guid::GenerateGUID()));
On 2014/08/29 22:08:46, Nico (hiding) wrote:
> ASCIIToWide returns a wstring, you want to call c_str() on it. As-is, this
won'd
> do anything useful:
> 
> 
> ..\..\chrome\installer\gcapi\gcapi_last_run_test.cc(30,32) :  error(clang):
> cannot pass object of non-trivial type 'std::wstring' (aka
> 'basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >') through
> variadic function; call will abort at runtime [-Wnon-pod-varargs]
>         L"hkcu_override\\%ls", base::ASCIIToWide(base::GenerateGUID()));
>                                ^
> 1 error generated.
> 
> 
> I suppose the test doesn't really care which value this is set to, and so it
> still passes?

Huh yeah, that was silly and no the test doesn't really care. This would only
really matter if the same test (or another test using the same scheme) was being
run twice on the same machine at the same time. Thanks for finding this.

Powered by Google App Engine
This is Rietveld 408576698