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

Unified Diff: components/offline_pages/snapshot_controller.cc

Issue 2063533002: Rewrite enum in MACRO_STYLE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change enum name to match ios convention Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/offline_pages/snapshot_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/snapshot_controller.cc
diff --git a/components/offline_pages/snapshot_controller.cc b/components/offline_pages/snapshot_controller.cc
index ace25101b5f1c8c49dc99a4997e44a70538f1af5..171149955269cd617a70c886d4742bc00ac5aa66 100644
--- a/components/offline_pages/snapshot_controller.cc
+++ b/components/offline_pages/snapshot_controller.cc
@@ -24,7 +24,7 @@ SnapshotController::SnapshotController(
SnapshotController::Client* client)
: task_runner_(task_runner),
client_(client),
- state_(State::kReady),
+ state_(State::READY),
weak_ptr_factory_(this) {
}
@@ -33,19 +33,19 @@ SnapshotController::~SnapshotController() {}
void SnapshotController::Reset() {
// Cancel potentially delayed tasks that relate to the previous 'session'.
weak_ptr_factory_.InvalidateWeakPtrs();
- state_ = State::kReady;
+ state_ = State::READY;
}
void SnapshotController::Stop() {
- state_ = State::kStopped;
+ state_ = State::STOPPED;
}
void SnapshotController::PendingSnapshotCompleted() {
// Unless the controller is "stopped", enable the subsequent snapshots.
// Stopped state prevents any further snapshots form being started.
- if (state_ == State::kStopped)
+ if (state_ == State::STOPPED)
return;
- state_ = State::kReady;
+ state_ = State::READY;
}
void SnapshotController::DocumentAvailableInMainFrame() {
@@ -66,9 +66,9 @@ void SnapshotController::DocumentOnLoadCompletedInMainFrame() {
}
void SnapshotController::MaybeStartSnapshot() {
- if (state_ != State::kReady)
+ if (state_ != State::READY)
return;
- state_ = State::kSnapshotPending;
+ state_ = State::SNAPSHOT_PENDING;
client_->StartSnapshot();
}
« no previous file with comments | « components/offline_pages/snapshot_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698