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: Minor refactoring. Renaming and a small cleanup. Created July 26, 2013, 12:05 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
« no previous file with comments | « html/static/js/IESettings.js ('k') | src/plugin/AdblockPlusClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 firstRunActionExecuted = false;
Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request)
{
@@ -214,6 +218,20 @@
}
break;
}
+ case Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED:
+ {
+ CriticalSection::Lock lock(firstRunLock);
+ if (!firstRunActionExecuted && filterEngine->IsFirstRun())
+ {
+ response << true;
+ firstRunActionExecuted = true;
+ }
+ else
+ {
+ response << false;
+ }
+ break;
+ }
}
return response;
« no previous file with comments | « html/static/js/IESettings.js ('k') | src/plugin/AdblockPlusClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld