Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/engine/main.cpp

Issue 11043057: First run page triggering (Closed)
Patch Set: All changes Created July 25, 2013, 2:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/engine/main.cpp
===================================================================
--- a/src/engine/main.cpp
+++ b/src/engine/main.cpp
@@ -8,6 +8,7 @@
#include "../shared/Dictionary.h"
#include "../shared/Utils.h"
#include "../shared/Version.h"
+#include "../shared/CriticalSection.h"
#include "Debug.h"
#include "Updater.h"
@@ -38,6 +39,9 @@
<< subscription->IsListed();
}
}
+
+ CriticalSection firstRunLock;
+ bool firstRunActionTaken = false;
Felix Dahlke 2013/07/25 14:54:37 "firstRunActionTaken" sounds wrong to my ears, I t
Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request)
{
@@ -214,6 +218,20 @@
}
break;
}
+ case Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED:
Felix Dahlke 2013/07/25 14:54:37 How about PROC_IS_FIRST_RUN? The function invoking
Oleksandr 2013/07/26 12:07:01 I would say the PROC_IS_FIRST_RUN would be confusi
Felix Dahlke 2013/08/02 10:52:24 Fair enough I guess. Might want to rename IsFirstR
+ {
+ CriticalSection::Lock lock(firstRunLock);
+ if (!firstRunActionTaken && filterEngine->IsFirstRun())
+ {
+ response << true;
+ firstRunActionTaken = true;
+ }
+ else
+ {
+ response << false;
+ }
+ break;
+ }
}
return response;

Powered by Google App Engine
This is Rietveld