Rename SonarStep

Summary: Part of sonar to flipper rename

Reviewed By: passy

Differential Revision: D9920275

fbshipit-source-id: 02f97d1e51d58864283d26e8d3a724cac973e938
This commit is contained in:
John Knox
2018-09-24 05:53:55 -07:00
committed by Facebook Github Bot
parent c1295b1bc9
commit 8ae77810d9
7 changed files with 18 additions and 18 deletions

View File

@@ -10,7 +10,7 @@
#include "FlipperConnectionImpl.h"
#include "FlipperResponderImpl.h"
#include "FlipperState.h"
#include "SonarStep.h"
#include "FlipperStep.h"
#include "FlipperConnectionManagerImpl.h"
#include "ConnectionContextStore.h"
#include "Log.h"

View File

@@ -15,7 +15,7 @@
#include "FlipperConnectionManager.h"
#include <map>
#include <mutex>
#include "SonarStep.h"
#include "FlipperStep.h"
#include <vector>
namespace facebook {

View File

@@ -7,7 +7,7 @@
*/
#include "FlipperConnectionManagerImpl.h"
#include "SonarStep.h"
#include "FlipperStep.h"
#include "ConnectionContextStore.h"
#include "Log.h"
#include <folly/String.h>

View File

@@ -7,7 +7,7 @@
*/
#include "FlipperState.h"
#include "FlipperStateUpdateListener.h"
#include "SonarStep.h"
#include "FlipperStep.h"
#include <vector>
using namespace facebook::flipper;
@@ -63,7 +63,7 @@ std::vector<StateElement> FlipperState::getStateElements() {
return v;
}
std::shared_ptr<SonarStep> FlipperState::start(std::string step_name) {
std::shared_ptr<FlipperStep> FlipperState::start(std::string step_name) {
started(step_name);
return std::make_shared<SonarStep>(step_name, this);
return std::make_shared<FlipperStep>(step_name, this);
}

View File

@@ -13,7 +13,7 @@
#include <vector>
#include <map>
class SonarStep;
class FlipperStep;
class FlipperStateUpdateListener;
namespace facebook {
@@ -32,7 +32,7 @@ public:
}
class FlipperState {
friend SonarStep;
friend FlipperStep;
public:
FlipperState();
@@ -41,10 +41,10 @@ class FlipperState {
std::vector<facebook::flipper::StateElement> getStateElements();
/* To record a state update, call start() with the name of the step to get a
SonarStep object. Call complete on this to register it successful,
FlipperStep object. Call complete on this to register it successful,
the absense of the completion call when it is destructed will register as a
step failure. */
std::shared_ptr<SonarStep> start(std::string step);
std::shared_ptr<FlipperStep> start(std::string step);
private:
void success(std::string);

View File

@@ -5,25 +5,25 @@
* file in the root directory of this source tree.
*
*/
#include "SonarStep.h"
#include "FlipperStep.h"
#include "FlipperState.h"
void SonarStep::complete() {
void FlipperStep::complete() {
isLogged = true;
state->success(name);
}
void SonarStep::fail(std::string message) {
void FlipperStep::fail(std::string message) {
isLogged = true;
state->failed(name, message);
}
SonarStep::SonarStep(std::string step, FlipperState* s) {
FlipperStep::FlipperStep(std::string step, FlipperState* s) {
state = s;
name = step;
}
SonarStep::~SonarStep() {
FlipperStep::~FlipperStep() {
if (!isLogged) {
state->failed(name, "");
}

View File

@@ -12,7 +12,7 @@
class FlipperState;
class SonarStep {
class FlipperStep {
public:
/* Mark this step as completed successfully
* failing to call complete() will be registered as a failure
@@ -22,8 +22,8 @@ class SonarStep {
// Mark the step as failed, and provide a message.
void fail(std::string message);
SonarStep(std::string name, FlipperState* state);
~SonarStep();
FlipperStep(std::string name, FlipperState* state);
~FlipperStep();
private:
std::string name;