From 3bb525a50bd1662284ed7d0366138a2918166060 Mon Sep 17 00:00:00 2001 From: "gears.daemon" Date: Wed, 20 Feb 2008 02:00:52 +0000 Subject: [PATCH] [Author: zork] Removing blobs from official builds. R=aa CC=google-gears-eng@googlegroups.com DELTA=288 (187 added, 90 deleted, 11 changed) OCL=6480448 SCL=6481910 git-svn-id: https://google-gears.googlecode.com/svn/trunk@984 fe895e04-df30-0410-9975-d76d301b4276 --- gears/Makefile | 2 ++ gears/base/common/js_runner_ff.cc | 10 ++++---- gears/base/firefox/module.cc | 38 ++++++++++++++--------------- gears/base/ie/interfaces.idl.m4 | 22 ++++++++--------- gears/blob/blob_ff.cc | 6 +++++ gears/blob/blob_ff.h | 6 +++++ gears/blob/blob_ie.cc | 6 +++++ gears/blob/blob_ie.h | 5 ++++ gears/blob/blob_interface.h | 6 +++++ gears/blob/buffer_blob.cc | 6 +++++ gears/blob/buffer_blob.h | 6 +++++ gears/blob/file_blob.cc | 6 +++++ gears/blob/file_blob.h | 6 +++++ gears/cctests/test.cc | 13 ++++++++++ gears/httprequest/firefox/httprequest_ff.cc | 6 +++++ gears/httprequest/firefox/httprequest_ff.h | 6 +++++ gears/httprequest/ie/httprequest_ie.cc | 6 +++++ gears/httprequest/ie/httprequest_ie.h | 10 +++++--- gears/localserver/common/resource_store.cc | 3 +++ gears/localserver/common/resource_store.h | 6 +++++ 20 files changed, 136 insertions(+), 39 deletions(-) diff --git a/gears/Makefile b/gears/Makefile index 5e90e79..f8d7e09 100644 --- a/gears/Makefile +++ b/gears/Makefile @@ -1312,6 +1312,7 @@ IEMOBILE_CPPSRCS += \ #----------------------------------------------------------------------------- # blob +ifneq ($(OFFICIAL_BUILD),1) FF_VPATH += \ blob \ $(NULL) @@ -1353,6 +1354,7 @@ IEMOBILE_CPPSRCS += \ buffer_blob.cc \ file_blob.cc \ $(NULL) +endif #----------------------------------------------------------------------------- # image/ff diff --git a/gears/base/common/js_runner_ff.cc b/gears/base/common/js_runner_ff.cc index 9e7414c..05afe34 100644 --- a/gears/base/common/js_runner_ff.cc +++ b/gears/base/common/js_runner_ff.cc @@ -39,15 +39,15 @@ #include "gears/base/common/js_runner.h" -#include "ff/genfiles/blob_ff.h" #include "ff/genfiles/console.h" #include "ff/genfiles/database.h" #include "ff/genfiles/desktop_ff.h" #include "ff/genfiles/httprequest.h" #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and Blgo APIs have not been finalized for official builds #else +#include "ff/genfiles/blob_ff.h" #include "ff/genfiles/image.h" #endif @@ -522,15 +522,15 @@ bool JsRunner::InitJavaScriptEngine() { {GEARSMANAGEDRESOURCESTOREINTERFACE_IID, NULL}, {GEARSRESOURCESTOREINTERFACE_IID, NULL}, // GEARSFILESUBMITTERINTERFACE_IID can never be created in a child worker - // blob - {GEARSBLOBINTERFACE_IID, NULL}, // timer {GEARSTIMERINTERFACE_IID, NULL}, // httprequest {GEARSHTTPREQUESTINTERFACE_IID, NULL}, #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and Blog APIs have not been finalized for official builds #else + // blob + {GEARSBLOBINTERFACE_IID, NULL}, // image {GEARSIMAGEINTERFACE_IID, NULL}, #endif diff --git a/gears/base/firefox/module.cc b/gears/base/firefox/module.cc index ef8dabf..14b4236 100644 --- a/gears/base/firefox/module.cc +++ b/gears/base/firefox/module.cc @@ -32,7 +32,6 @@ #include #include "gears/base/common/thread_locals.h" -#include "gears/blob/blob_ff.h" #include "gears/console/firefox/console_ff.h" #include "gears/database/firefox/database.h" #include "gears/database/firefox/result_set.h" @@ -41,8 +40,9 @@ #include "gears/httprequest/firefox/httprequest_ff.h" #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and Blob APIs have not been finalized for official builds #else +#include "gears/blob/blob_ff.h" #include "gears/image/firefox/image_ff.h" #include "gears/image/firefox/image_loader_ff.h" #endif @@ -171,12 +171,6 @@ NS_DOMCI_EXTENSION(Scour) NS_DOMCI_EXTENSION_ENTRY_END_NO_PRIMARY_IF(GearsFileSubmitter, PR_TRUE, &kGearsFileSubmitterClassId) - // blob - NS_DOMCI_EXTENSION_ENTRY_BEGIN(GearsBlob) - NS_DOMCI_EXTENSION_ENTRY_INTERFACE(GearsBlobInterface) - NS_DOMCI_EXTENSION_ENTRY_END_NO_PRIMARY_IF(GearsBlob, PR_TRUE, - &kGearsBlobClassId) - // timer NS_DOMCI_EXTENSION_ENTRY_BEGIN(GearsTimer) NS_DOMCI_EXTENSION_ENTRY_INTERFACE(GearsTimerInterface) @@ -190,8 +184,14 @@ NS_DOMCI_EXTENSION(Scour) &kGearsConsoleClassId) #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and blob APIs have not been finalized for official builds #else + // blob + NS_DOMCI_EXTENSION_ENTRY_BEGIN(GearsBlob) + NS_DOMCI_EXTENSION_ENTRY_INTERFACE(GearsBlobInterface) + NS_DOMCI_EXTENSION_ENTRY_END_NO_PRIMARY_IF(GearsBlob, PR_TRUE, + &kGearsBlobClassId) + // image NS_DOMCI_EXTENSION_ENTRY_BEGIN(GearsImage) NS_DOMCI_EXTENSION_ENTRY_INTERFACE(GearsImageInterface) @@ -257,15 +257,15 @@ static NS_METHOD ScourRegisterSelf(nsIComponentManager *compMgr, GEARSRESOURCESTOREINTERFACE_IID_STR }, { kGearsFileSubmitterClassName, "GearsFileSubmitterInterface", GEARSFILESUBMITTERINTERFACE_IID_STR }, - // blob - { kGearsBlobClassName, "GearsBlobInterface", - GEARSBLOBINTERFACE_IID_STR }, // timer { kGearsTimerClassName, "GearsTimerInterface", GEARSTIMERINTERFACE_IID_STR }, #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and blob APIs have not been finalized for official builds #else + // blob + { kGearsBlobClassName, "GearsBlobInterface", + GEARSBLOBINTERFACE_IID_STR }, // image { kGearsImageClassName, "GearsImageInterface", GEARSIMAGEINTERFACE_IID_STR }, @@ -318,16 +318,16 @@ NS_DECL_DOM_CLASSINFO(GearsManagedResourceStore) NS_DECL_DOM_CLASSINFO(GearsResourceStore) NS_DECL_DOM_CLASSINFO(GearsFileSubmitter) -// blob -NS_DECL_DOM_CLASSINFO(GearsBlob) // timer NS_DECL_DOM_CLASSINFO(GearsTimer) // console NS_DECL_DOM_CLASSINFO(GearsConsole) #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and blob APIs have not been finalized for official builds #else +// blob +NS_DECL_DOM_CLASSINFO(GearsBlob) // image NS_DECL_DOM_CLASSINFO(GearsImage) NS_DECL_DOM_CLASSINFO(GearsImageLoader) @@ -357,16 +357,16 @@ void PR_CALLBACK ScourModuleDestructor(nsIModule *self) { NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsLocalServer)); NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsManagedResourceStore)); NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsResourceStore)); - // blob - NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsBlob)); // timer NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsTimer)); // console NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsConsole)); #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and blob APIs have not been finalized for official builds #else + // blob + NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsBlob)); // image NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsImage)); NS_IF_RELEASE(NS_CLASSINFO_NAME(GearsImageLoader)); diff --git a/gears/base/ie/interfaces.idl.m4 b/gears/base/ie/interfaces.idl.m4 index 99823f7..4461757 100644 --- a/gears/base/ie/interfaces.idl.m4 +++ b/gears/base/ie/interfaces.idl.m4 @@ -52,7 +52,6 @@ import "ui/ie/html_dialog_bridge_iemobile.idl"; import "ui/ie/html_dialog_host_iemobile.idl"; #endif -import "blob/blob_ie.idl"; import "console/ie/console.idl"; import "database/ie/database.idl"; import "desktop/desktop_ie.idl"; @@ -63,8 +62,9 @@ import "httprequest/ie/httprequest.idl"; // The Image API is not yet available for WinCE. #else #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and blob APIs have not been finalized for official builds #else +import "blob/blob_ie.idl"; import "image/ie/image.idl"; #endif #endif @@ -151,14 +151,6 @@ library GearsTypelib }; [ - uuid(B4F3B2E2-6200-4796-B49D-471BD24F18F5) - ] - coclass GearsBlob - { - [default] interface GearsBlobInterface; - }; - - [ uuid(51C2DE73-6A33-4975-8D7D-C521064F8A83) ] coclass GearsConsole @@ -218,9 +210,17 @@ library GearsTypelib // The Image API is not yet available for WinCE. #else #ifdef OFFICIAL_BUILD -// The Image API has not been finalized for official builds +// The Image and blob APIs have not been finalized for official builds #else [ + uuid(B4F3B2E2-6200-4796-B49D-471BD24F18F5) + ] + coclass GearsBlob + { + [default] interface GearsBlobInterface; + }; + + [ uuid(D946AEB2-263E-4448-8F29-FC714A86E9A1) ] coclass GearsImageLoader diff --git a/gears/blob/blob_ff.cc b/gears/blob/blob_ff.cc index ed142df..68a4579 100644 --- a/gears/blob/blob_ff.cc +++ b/gears/blob/blob_ff.cc @@ -23,6 +23,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include // for PR_* #include // for NS_IMPL_* and NS_INTERFACE_* #include @@ -66,3 +70,5 @@ NS_IMETHODIMP GearsBlob::GetContents(const BlobInterface** retval) { *retval = contents_.get(); return NS_OK; } + +#endif // not OFFICIAL_BUILD diff --git a/gears/blob/blob_ff.h b/gears/blob/blob_ff.h index 5d24ac3..c5f54e6 100644 --- a/gears/blob/blob_ff.h +++ b/gears/blob/blob_ff.h @@ -26,6 +26,10 @@ #ifndef GEARS_BLOB_BLOB_FF_H__ #define GEARS_BLOB_BLOB_FF_H__ +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include "ff/genfiles/blob_ff.h" #include "gears/base/common/base_class.h" #include "gears/blob/blob_interface.h" @@ -60,4 +64,6 @@ class GearsBlob DISALLOW_EVIL_CONSTRUCTORS(GearsBlob); }; +#endif // not OFFICIAL_BUILD + #endif // GEARS_BLOB_BLOB_FF_H__ diff --git a/gears/blob/blob_ie.cc b/gears/blob/blob_ie.cc index 6615591..b067096 100644 --- a/gears/blob/blob_ie.cc +++ b/gears/blob/blob_ie.cc @@ -23,6 +23,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include "gears/base/common/security_model.h" #include "gears/base/common/string16.h" #include "gears/base/ie/activex_utils.h" @@ -53,3 +57,5 @@ STDMETHODIMP GearsBlob::get_contents(VARIANT *retval) { const_cast(reinterpret_cast(contents_.get())); RETURN_NORMAL(); } + +#endif // not OFFICIAL_BUILD diff --git a/gears/blob/blob_ie.h b/gears/blob/blob_ie.h index 6fffffd..f875f93 100644 --- a/gears/blob/blob_ie.h +++ b/gears/blob/blob_ie.h @@ -26,6 +26,10 @@ #ifndef GEARS_BLOB_BLOB_IE_H__ #define GEARS_BLOB_BLOB_IE_H__ +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include "ie/genfiles/interfaces.h" // from OUTDIR #include "gears/base/common/base_class.h" #include "gears/base/common/common.h" @@ -68,5 +72,6 @@ class ATL_NO_VTABLE GearsBlob DISALLOW_EVIL_CONSTRUCTORS(GearsBlob); }; +#endif // not OFFICIAL_BUILD #endif // GEARS_BLOB_BLOB_IE_H__ diff --git a/gears/blob/blob_interface.h b/gears/blob/blob_interface.h index 87dc0b1..4030006 100644 --- a/gears/blob/blob_interface.h +++ b/gears/blob/blob_interface.h @@ -26,6 +26,10 @@ #ifndef GEARS_BLOB_BLOB_INTERFACE_H__ #define GEARS_BLOB_BLOB_INTERFACE_H__ +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include "gears/base/common/common.h" class BlobInterface { @@ -65,4 +69,6 @@ class EmptyBlob : public BlobInterface { DISALLOW_EVIL_CONSTRUCTORS(EmptyBlob); }; +#endif // not OFFICIAL_BUILD + #endif // GEARS_BLOB_BLOB_INTERFACE_H__ diff --git a/gears/blob/buffer_blob.cc b/gears/blob/buffer_blob.cc index 9593490..dc78073 100644 --- a/gears/blob/buffer_blob.cc +++ b/gears/blob/buffer_blob.cc @@ -23,6 +23,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include #include "gears/blob/buffer_blob.h" @@ -84,3 +88,5 @@ int64 BufferBlob::Length() const { MutexLock lock(&mutex_); return buffer_.size(); } + +#endif // not OFFICIAL_BUILD diff --git a/gears/blob/buffer_blob.h b/gears/blob/buffer_blob.h index 7a6bd34..49be8f1 100644 --- a/gears/blob/buffer_blob.h +++ b/gears/blob/buffer_blob.h @@ -26,6 +26,10 @@ #ifndef GEARS_BLOB_BUFFER_BLOB_H__ #define GEARS_BLOB_BUFFER_BLOB_H__ +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include #include "gears/base/common/mutex.h" #include "gears/blob/blob_interface.h" @@ -72,4 +76,6 @@ class BufferBlob : public BlobInterface { DISALLOW_EVIL_CONSTRUCTORS(BufferBlob); }; +#endif // not OFFICIAL_BUILD + #endif // GEARS_BLOB_BUFFER_BLOB_H__ diff --git a/gears/blob/file_blob.cc b/gears/blob/file_blob.cc index a63f38a..754b26e 100644 --- a/gears/blob/file_blob.cc +++ b/gears/blob/file_blob.cc @@ -23,6 +23,10 @@ // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include "gears/base/common/file.h" #include "gears/blob/file_blob.h" @@ -42,3 +46,5 @@ int FileBlob::Read(uint8* destination, int max_bytes, int64 offset) const { int64 FileBlob::Length() const { return File::GetFileSize(filename_.c_str()); } + +#endif // not OFFICIAL_BUILD diff --git a/gears/blob/file_blob.h b/gears/blob/file_blob.h index 00d9557..004184d 100644 --- a/gears/blob/file_blob.h +++ b/gears/blob/file_blob.h @@ -26,6 +26,10 @@ #ifndef GEARS_DESKTOP_FILE_BLOB_H__ #define GEARS_DESKTOP_FILE_BLOB_H__ +#ifdef OFFICIAL_BUILD +// The blob API has not been finalized for official builds +#else + #include "gears/blob/blob_interface.h" #include "gears/base/common/string16.h" @@ -47,4 +51,6 @@ class FileBlob : public BlobInterface { DISALLOW_EVIL_CONSTRUCTORS(FileBlob); }; +#endif // not OFFICIAL_BUILD + #endif // GEARS_DESKTOP_FILE_BLOB_H__ diff --git a/gears/cctests/test.cc b/gears/cctests/test.cc index a600d88..1c06e3f 100644 --- a/gears/cctests/test.cc +++ b/gears/cctests/test.cc @@ -52,7 +52,10 @@ void Dispatcher::Init() { #include "gears/base/common/permissions_db_test.h" #include "gears/base/common/sqlite_wrapper_test.h" #include "gears/base/common/string_utils.h" +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds #include "gears/blob/buffer_blob.h" +#endif #include "gears/localserver/common/http_cookies.h" #include "gears/localserver/common/http_request.h" #include "gears/localserver/common/localserver_db.h" @@ -75,7 +78,10 @@ bool TestUrlUtils(); // from url_utils_test.cc bool TestJsRootedTokenLifetime(); // from base_class_test.cc bool TestStringUtils(); // from string_utils_test.cc bool TestSerialization(); // from serialization_test.cc +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds bool TestBufferBlob(); +#endif // not OFFICIAL_BUILD void GearsTest::RunTests(JsCallContext *context) { @@ -108,7 +114,10 @@ void GearsTest::RunTests(JsCallContext *context) { ok &= TestManagedResourceStore(); ok &= TestMessageService(); ok &= TestSerialization(); +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds ok &= TestBufferBlob(); +#endif // not OFFICIAL_BUILD // TODO(zork): Add this test back in once it doesn't crash the browser. //ok &= TestJsRootedTokenLifetime(); @@ -805,6 +814,8 @@ bool TestHttpRequest() { return true; } +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds bool TestBufferBlob() { #undef TEST_ASSERT #define TEST_ASSERT(b) \ @@ -890,4 +901,6 @@ bool TestBufferBlob() { return true; } +#endif // not OFFICIAL_BUILD + #endif // DEBUG diff --git a/gears/httprequest/firefox/httprequest_ff.cc b/gears/httprequest/firefox/httprequest_ff.cc index 45cd708..7ff0e72 100644 --- a/gears/httprequest/firefox/httprequest_ff.cc +++ b/gears/httprequest/firefox/httprequest_ff.cc @@ -35,8 +35,11 @@ #include "gears/base/common/string_utils.h" #include "gears/base/common/url_utils.h" #include "gears/base/firefox/dom_utils.h" +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds #include "gears/blob/blob_ff.h" #include "gears/blob/buffer_blob.h" +#endif #include "gears/localserver/common/http_constants.h" // Returns true if the currently executing thread is the main UI thread, @@ -157,7 +160,10 @@ NS_IMETHODIMP GearsHttpRequest::Open() { response_info_.reset(new ResponseInfo()); response_info_->pending_ready_state = HttpRequest::OPEN; response_info_->ready_state = HttpRequest::UNINITIALIZED; +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds response_info_->response_blob = NULL; +#endif } OnReadyStateChangedCall(); diff --git a/gears/httprequest/firefox/httprequest_ff.h b/gears/httprequest/firefox/httprequest_ff.h index 4ac18ad..a86c55e 100644 --- a/gears/httprequest/firefox/httprequest_ff.h +++ b/gears/httprequest/firefox/httprequest_ff.h @@ -38,7 +38,10 @@ #include "gears/base/common/js_runner.h" #include "gears/base/common/mutex.h" #include "gears/base/common/string16.h" +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds #include "gears/blob/blob_ff.h" +#endif #include "gears/localserver/common/http_request.h" #include "gears/third_party/scoped_ptr/scoped_ptr.h" @@ -96,9 +99,12 @@ class GearsHttpRequest // response_blob scoped_ptr< std::vector > response_body; +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds // only valid when IsComplete and after ownership of the body has been // transfered nsCOMPtr response_blob; +#endif ResponseInfo() : pending_ready_state(HttpRequest::UNINITIALIZED), ready_state(HttpRequest::UNINITIALIZED), status(0) {} diff --git a/gears/httprequest/ie/httprequest_ie.cc b/gears/httprequest/ie/httprequest_ie.cc index c7a982f..a5ae38f 100644 --- a/gears/httprequest/ie/httprequest_ie.cc +++ b/gears/httprequest/ie/httprequest_ie.cc @@ -33,8 +33,11 @@ #include "gears/base/common/string_utils.h" #include "gears/base/common/url_utils.h" #include "gears/base/ie/activex_utils.h" +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds #include "gears/blob/blob_ie.h" #include "gears/blob/buffer_blob.h" +#endif // not OFFICIAL_BUILD #include "gears/localserver/common/http_constants.h" @@ -496,7 +499,10 @@ void GearsHttpRequest::ReleaseRequest() { request_->ReleaseReference(); request_ = NULL; response_text_.reset(NULL); +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds response_blob_ = NULL; +#endif // not OFFICIAL_BUILD } } diff --git a/gears/httprequest/ie/httprequest_ie.h b/gears/httprequest/ie/httprequest_ie.h index def11cf..24de7b0 100644 --- a/gears/httprequest/ie/httprequest_ie.h +++ b/gears/httprequest/ie/httprequest_ie.h @@ -94,12 +94,11 @@ class ATL_NO_VTABLE GearsHttpRequest virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_responseText( /* [retval][out] */ BSTR *body); -#ifdef OFFICIAL_BUILD - // Blob support is not ready for prime time yet -#else +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_responseBlob( /* [retval][out] */ IUnknown **blob); -#endif +#endif // not OFFICIAL_BUILD virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_status( /* [retval][out] */ int *statusCode); @@ -114,8 +113,11 @@ class ATL_NO_VTABLE GearsHttpRequest // Null if response_text_ has not yet been cached scoped_ptr response_text_; +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds // Valid only after a successful get_responseBlob() CComPtr response_blob_; +#endif // not OFFICIAL_BUILD bool content_type_header_was_set_; bool has_fired_completion_event_; diff --git a/gears/localserver/common/resource_store.cc b/gears/localserver/common/resource_store.cc index 0b8ddf8..50842ea 100644 --- a/gears/localserver/common/resource_store.cc +++ b/gears/localserver/common/resource_store.cc @@ -66,6 +66,8 @@ static void AppendHeader(std::string16 &headers, headers.append(HttpConstants::kCrLf); } +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds //------------------------------------------------------------------------------ // BlobToItem //------------------------------------------------------------------------------ @@ -104,6 +106,7 @@ bool ResourceStore::BlobToItem(const BlobInterface *blob, item->payload.headers = headers; return true; } +#endif //------------------------------------------------------------------------------ diff --git a/gears/localserver/common/resource_store.h b/gears/localserver/common/resource_store.h index c730b0d..cd084d1 100644 --- a/gears/localserver/common/resource_store.h +++ b/gears/localserver/common/resource_store.h @@ -29,7 +29,10 @@ #include "gears/base/common/common.h" #include "gears/base/common/sqlite_wrapper.h" #include "gears/base/common/string16.h" +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds #include "gears/blob/blob_interface.h" +#endif #include "gears/localserver/common/localserver.h" #include "gears/localserver/common/localserver_db.h" @@ -51,10 +54,13 @@ class ResourceStore : public LocalServer { WebCacheDB::PayloadInfo payload; }; +#ifndef OFFICIAL_BUILD +// The blob API has not been finalized for official builds // Converts a Blob to an Item that could be served by ResourceStore static bool BlobToItem(const BlobInterface *blob, const char16 *full_url, Item *out); +#endif // Constructor ResourceStore(); -- 2.11.4.GIT