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

Unified Diff: goopdate/app_bundle_state_busy.cc

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 | « goopdate/app_bundle_state_busy.h ('k') | goopdate/app_bundle_state_init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: goopdate/app_bundle_state_busy.cc
diff --git a/goopdate/app_bundle_state_busy.cc b/goopdate/app_bundle_state_busy.cc
deleted file mode 100644
index 51be42eb8846753b3a777fb539b0c8e2c1023fe3..0000000000000000000000000000000000000000
--- a/goopdate/app_bundle_state_busy.cc
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright 2010 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ========================================================================
-
-#include "omaha/goopdate/app_bundle_state_busy.h"
-#include "omaha/base/debug.h"
-#include "omaha/base/error.h"
-#include "omaha/base/logging.h"
-#include "omaha/goopdate/app_bundle_state_paused.h"
-#include "omaha/goopdate/app_bundle_state_ready.h"
-#include "omaha/goopdate/app_bundle_state_stopped.h"
-#include "omaha/goopdate/model.h"
-
-namespace omaha {
-
-namespace fsm {
-
-HRESULT AppBundleStateBusy::Pause(AppBundle* app_bundle) {
- CORE_LOG(L3, (_T("[AppBundleStateBusy::Pause][0x%p]"), app_bundle));
- ASSERT1(app_bundle);
- ASSERT1(app_bundle->model()->IsLockedByCaller());
- ASSERT1(IsPendingNonBlockingCall(app_bundle));
-
- HRESULT hr = app_bundle->model()->Pause(app_bundle);
- if (FAILED(hr)) {
- CORE_LOG(LE, (_T("[Pause failed][0x%08x][0x%p]"), hr, app_bundle));
- return hr;
- }
-
- ChangeState(app_bundle, new AppBundleStatePaused);
- return S_OK;
-}
-
-HRESULT AppBundleStateBusy::Stop(AppBundle* app_bundle) {
- CORE_LOG(L3, (_T("[AppBundleStateBusy::Stop][0x%p]"), app_bundle));
- ASSERT1(app_bundle);
- ASSERT1(app_bundle->model()->IsLockedByCaller());
- ASSERT1(IsPendingNonBlockingCall(app_bundle));
-
- HRESULT hr = app_bundle->model()->Stop(app_bundle);
- if (FAILED(hr)) {
- CORE_LOG(LE, (_T("[Stop failed][0x%08x][0x%p]"), hr, app_bundle));
- return hr;
- }
-
- // Handling Stop is non-blocking. The worker completes the pending bundle
- // calls while the bundle remains in the stopped state.
- ChangeState(app_bundle, new AppBundleStateStopped);
- return S_OK;
-}
-
-HRESULT AppBundleStateBusy::CompleteAsyncCall(AppBundle* app_bundle) {
- CORE_LOG(L3, (_T("[AppBundleStateBusy::CompleteAsyncCall][0x%p]"),
- app_bundle));
- ASSERT1(IsPendingNonBlockingCall(app_bundle));
- ChangeState(app_bundle, new AppBundleStateReady);
- return S_OK;
-}
-
-HRESULT AppBundleStateBusy::Download(AppBundle* app_bundle) {
- UNREFERENCED_PARAMETER(app_bundle);
- ASSERT1(IsPendingNonBlockingCall(app_bundle));
- return GOOPDATE_E_NON_BLOCKING_CALL_PENDING;
-}
-
-HRESULT AppBundleStateBusy::Install(AppBundle* app_bundle) {
- UNREFERENCED_PARAMETER(app_bundle);
- ASSERT1(IsPendingNonBlockingCall(app_bundle));
- return GOOPDATE_E_NON_BLOCKING_CALL_PENDING;
-}
-
-HRESULT AppBundleStateBusy::DownloadPackage(AppBundle* app_bundle,
- const CString& app_id,
- const CString& package_name) {
- UNREFERENCED_PARAMETER(app_bundle);
- UNREFERENCED_PARAMETER(app_id);
- UNREFERENCED_PARAMETER(package_name);
- ASSERT1(IsPendingNonBlockingCall(app_bundle));
- return GOOPDATE_E_NON_BLOCKING_CALL_PENDING;
-}
-
-bool AppBundleStateBusy::IsBusy() const {
- return true;
-}
-
-} // namespace fsm
-
-} // namespace omaha
« no previous file with comments | « goopdate/app_bundle_state_busy.h ('k') | goopdate/app_bundle_state_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698