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

Unified Diff: net/bits_job_callback.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 | « net/bits_job_callback.h ('k') | net/bits_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/bits_job_callback.cc
diff --git a/net/bits_job_callback.cc b/net/bits_job_callback.cc
deleted file mode 100644
index 02943cb314793a2fe265a2957b45f6a3d69b7932..0000000000000000000000000000000000000000
--- a/net/bits_job_callback.cc
+++ /dev/null
@@ -1,90 +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/net/bits_job_callback.h"
-#include "omaha/base/debug.h"
-#include "omaha/base/error.h"
-#include "omaha/base/logging.h"
-#include "omaha/base/utils.h"
-#include "omaha/net/bits_request.h"
-#include "omaha/net/bits_utils.h"
-
-namespace omaha {
-
-HRESULT BitsJobCallback::Create(BitsRequest* bits_request,
- BitsJobCallback** bits_job_callback) {
- ASSERT1(bits_request);
- ASSERT1(bits_job_callback);
-
- *bits_job_callback = NULL;
- scoped_ptr<CComObjectNoLock<BitsJobCallback> > callback_obj(
- new CComObjectNoLock<BitsJobCallback>);
- if (callback_obj == NULL) {
- return E_OUTOFMEMORY;
- }
-
- callback_obj->AddRef();
- callback_obj->bits_request_ = bits_request;
- *bits_job_callback = callback_obj.release();
-
- return S_OK;
-}
-
-void BitsJobCallback::RemoveReferenceToBitsRequest() {
- __mutexScope(lock_);
- bits_request_ = NULL;
-}
-
-HRESULT BitsJobCallback::JobTransferred(IBackgroundCopyJob* bits_job) {
- UNREFERENCED_PARAMETER(bits_job);
-
- __mutexScope(lock_);
- if (bits_request_) {
- bits_request_->OnBitsJobStateChanged();
- }
-
- // Returns S_OK to avoid BITS continuing to call this callback.
- return S_OK;
-}
-
-HRESULT BitsJobCallback::JobError(IBackgroundCopyJob* bits_job,
- IBackgroundCopyError* error) {
- UNREFERENCED_PARAMETER(bits_job);
- UNREFERENCED_PARAMETER(error);
-
- __mutexScope(lock_);
- if (bits_request_) {
- bits_request_->OnBitsJobStateChanged();
- }
-
- // Returns S_OK to avoid BITS continuing to call this callback.
- return S_OK;
-}
-
-HRESULT BitsJobCallback::JobModification(IBackgroundCopyJob* bits_job,
- DWORD reserved) {
- ASSERT1(bits_job);
- UNREFERENCED_PARAMETER(bits_job);
- UNREFERENCED_PARAMETER(reserved);
-
- __mutexScope(lock_);
- if (bits_request_) {
- bits_request_->OnBitsJobStateChanged();
- }
- return S_OK;
-}
-
-} // namespace omaha
-
« no previous file with comments | « net/bits_job_callback.h ('k') | net/bits_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698