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

Unified Diff: goopdate/app_bundle_state.h

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.cc ('k') | goopdate/app_bundle_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: goopdate/app_bundle_state.h
diff --git a/goopdate/app_bundle_state.h b/goopdate/app_bundle_state.h
deleted file mode 100644
index 38ecb25116335210eec2e9db8c3a8596c65a870f..0000000000000000000000000000000000000000
--- a/goopdate/app_bundle_state.h
+++ /dev/null
@@ -1,113 +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.
-// ========================================================================
-
-#ifndef OMAHA_GOOPDATE_APP_BUNDLE_STATE_H_
-#define OMAHA_GOOPDATE_APP_BUNDLE_STATE_H_
-
-#include <windows.h>
-#include <atlstr.h>
-#include "base/basictypes.h"
-
-namespace omaha {
-
-class App;
-class AppBundle;
-class AppBundleTest;
-class WebServicesClientInterface;
-
-namespace fsm {
-
-// Defines the interface for encapsulating behavior associated with a particular
-// state of the AppBundle object.
-// All state transition calls should go through AppBundle, meaning it is the
-// only class that should use this interface.
-class AppBundleState {
- public:
- virtual ~AppBundleState() {}
-
- virtual HRESULT put_altTokens(AppBundle* app_bundle,
- ULONG_PTR impersonation_token,
- ULONG_PTR primary_token,
- DWORD caller_proc_id);
- virtual HRESULT put_sessionId(AppBundle* app_bundle, BSTR session_id);
- virtual HRESULT Initialize(AppBundle* app_bundle);
- virtual HRESULT CreateApp(AppBundle* app_bundle,
- const CString& app_id,
- App** app);
- virtual HRESULT CreateInstalledApp(AppBundle* app_bundle,
- const CString& app_id,
- App** app);
- virtual HRESULT CreateAllInstalledApps(AppBundle* app_bundle);
-
- virtual HRESULT CheckForUpdate(AppBundle* app_bundle);
- virtual HRESULT Download(AppBundle* app_bundle);
- virtual HRESULT Install(AppBundle* app_bundle);
-
- virtual HRESULT UpdateAllApps(AppBundle* app_bundle);
-
- virtual HRESULT Stop(AppBundle* app_bundle);
- virtual HRESULT Pause(AppBundle* app_bundle);
- virtual HRESULT Resume(AppBundle* app_bundle);
-
- virtual HRESULT DownloadPackage(AppBundle* app_bundle,
- const CString& app_id,
- const CString& package_name);
-
- virtual HRESULT CompleteAsyncCall(AppBundle* app_bundle);
-
- virtual bool IsBusy() const;
-
- protected:
- enum BundleState {
- STATE_INIT,
- STATE_INITIALIZED,
- STATE_BUSY,
- STATE_READY,
- STATE_PAUSED,
- STATE_STOPPED,
- };
-
-
- explicit AppBundleState(BundleState state) : state_(state) {}
-
- // These functions provide pass-through access to private AppBundle members.
- // TODO(omaha): remove paranoid asserts and implement inline.
- void AddAppToBundle(AppBundle* app_bundle, App* app);
- bool IsPendingNonBlockingCall(AppBundle* app_bundle);
-
- HRESULT DoDownloadPackage(AppBundle* app_bundle,
- const CString& app_id,
- const CString& package_name);
-
- // After calling this method, the old state (this object) is deleted and the
- // code may not reference the members of the old state anymore.
- void ChangeState(AppBundle* app_bundle, AppBundleState* state);
-
- HRESULT HandleInvalidStateTransition(AppBundle* app_bundle,
- const TCHAR* function_name);
-
- private:
- friend class AppBundleTest;
-
- BundleState state_;
-
- DISALLOW_COPY_AND_ASSIGN(AppBundleState);
-};
-
-} // namespace fsm
-
-} // namespace omaha
-
-#endif // OMAHA_GOOPDATE_APP_BUNDLE_STATE_H_
« no previous file with comments | « goopdate/app_bundle.cc ('k') | goopdate/app_bundle_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698