Remove Memory Sampler
authorTomasz Czekala <t.czekala@partner.samsung.com>
Wed, 7 Jan 2015 14:35:15 +0000 (15:35 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Patch removes Memory Sampler EWK interface and mocks it's implementation.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=9553
Reviewed by: Antonio Gomes, Janusz Majnert

Change-Id: I2ab75cd46034efb8c646e7eef0db369d926920c7
Signed-off-by: Tomasz Czekala <t.czekala@partner.samsung.com>
tizen_src/ewk/efl_integration/public/ewk_context.cc
tizen_src/ewk/efl_integration/public/ewk_context.h
tizen_src/ewk/unittest/ewk-tests.gypi
tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_start_func.cpp [deleted file]
tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_stop_func.cpp [deleted file]
tizen_src/impl/eweb_context.cc
tizen_src/impl/eweb_context.h
tizen_src/impl/tizen_webview/public/tw_web_context.cc
tizen_src/impl/tizen_webview/public/tw_web_context.h

index ab81ede..190ceda 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2013 Samsung Electronics. All rights reserved.
+// Copyright 2013-2015 Samsung Electronics. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -341,14 +341,12 @@ void ewk_context_mime_override_callback_set(Ewk_Context_Override_Mime_For_Url_Ca
 
 void ewk_context_memory_sampler_start(Ewk_Context* context, double timerInterval)
 {
-  EINA_SAFETY_ON_NULL_RETURN(context);
-  context->StartMemorySampler(timerInterval);
+  LOG_EWK_API_MOCKUP();
 }
 
 void ewk_context_memory_sampler_stop(Ewk_Context* context)
 {
-  EINA_SAFETY_ON_NULL_RETURN(context);
-  context->StopMemorySampler();
+  LOG_EWK_API_MOCKUP();
 }
 
 Eina_Bool ewk_context_additional_plugin_path_set(Ewk_Context *context, const char *path)
index 2557050..a3cb844 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2013 Samsung Electronics. All rights reserved.
+// Copyright 2013-2015 Samsung Electronics. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -542,19 +542,21 @@ EAPI void ewk_context_did_start_download_callback_set(Ewk_Context* context, Ewk_
 EAPI void ewk_context_mime_override_callback_set(Ewk_Context_Override_Mime_For_Url_Callback callback);
 
 /**
- * start memory sampler.
+ * Deprecated, this function dose nothing, it's left to allow legacy applications to work with current builds
+ * Starts memory sampler.
  *
  * @param context context object
  * @param interval time gap to fire the timer
-*/
-EAPI void ewk_context_memory_sampler_start(Ewk_Context* context, double timer_interval);
+ */
+EINA_DEPRECATED EAPI void ewk_context_memory_sampler_start(Ewk_Context* context, double timer_interval);
 
 /**
-* stop memory sampler.
-*
-* @param context context object
-*/
-EAPI void ewk_context_memory_sampler_stop(Ewk_Context* context);
+ * Deprecated, this function dose nothing, it's left to allow legacy applications to work with current builds
+ * Stops memory sampler.
+ *
+ * @param context context object
+ */
+EINA_DEPRECATED EAPI void ewk_context_memory_sampler_stop(Ewk_Context* context);
 
 /**
  * @typedef Ewk_Vibration_Client_Vibrate_Cb Ewk_Vibration_Client_Vibrate_Cb
index 2fd3b65..658c52b 100644 (file)
         'utc_blink_ewk_context_inspector_server_stop_func.cpp',
         'utc_blink_ewk_context_local_file_system_all_delete_func.cpp',
         'utc_blink_ewk_context_local_file_system_delete_func.cpp',
-        'utc_blink_ewk_context_memory_sampler_start_func.cpp',
-        'utc_blink_ewk_context_memory_sampler_stop_func.cpp',
         'utc_blink_ewk_context_menu.h',
         'utc_blink_ewk_context_menu_item_append_as_action_func.cpp',
         'utc_blink_ewk_context_menu_item_append_func.cpp',
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_start_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_start_func.cpp
deleted file mode 100644 (file)
index a70b1cd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 Samsung Electronics. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "utc_blink_ewk_base.h"
-
-class utc_blink_ewk_context_memory_sampler_start: public utc_blink_ewk_base
-{
-};
-
-/**
- * @brief Checking whether memory sampler is started.
- */
-TEST_F(utc_blink_ewk_context_memory_sampler_start, POS_TEST)
-{
-    ewk_context_memory_sampler_start(ewk_view_context_get(GetEwkWebView()), 1);
-    ewk_context_memory_sampler_stop(ewk_view_context_get(GetEwkWebView()));
-
-    utc_pass();
-}
-
-/**
- * @brief Checking whether function works properly in case of NULL of a context.
- */
-TEST_F(utc_blink_ewk_context_memory_sampler_start, NEG_TEST)
-{
-    ewk_context_memory_sampler_start(NULL, 0);
-
-    utc_pass();
-}
diff --git a/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_stop_func.cpp b/tizen_src/ewk/unittest/utc_blink_ewk_context_memory_sampler_stop_func.cpp
deleted file mode 100644 (file)
index 591c024..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2013 Samsung Electronics. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "utc_blink_ewk_base.h"
-
-class utc_blink_ewk_context_memory_sampler_stop: public utc_blink_ewk_base
-{
-};
-
-/**
- * @brief Checking whether memory sampler is stopped.
- */
-TEST_F(utc_blink_ewk_context_memory_sampler_stop, POS_TEST)
-{
-    ewk_context_memory_sampler_start(ewk_view_context_get(GetEwkWebView()), 1);
-    ewk_context_memory_sampler_stop(ewk_view_context_get(GetEwkWebView()));
-
-    utc_pass();
-}
-
-/**
- * @brief Checking whether function works properly in case of NULL of a context.
- */
-TEST_F(utc_blink_ewk_context_memory_sampler_stop, NEG_TEST)
-{
-    ewk_context_memory_sampler_stop(NULL);
-
-    utc_pass();
-}
index 92e1fe5..41dd534 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2014 Samsung Electronics. All rights reserved.
+// Copyright 2014-2015 Samsung Electronics. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -468,14 +468,6 @@ Evas_Object *EWebContext::AddFaviconObject(const char* uri, Evas* canvas) const
   return favicon;
 }
 
-void EWebContext::StartMemorySampler(double timerInterval) const {
-  LOG(INFO) << "Memory Sampler deprecated";
-}
-
-void EWebContext::StopMemorySampler() const {
-  LOG(INFO) << "Memory Sampler deprecated";
-}
-
 void EWebContext::ClearCandidateData() {
 #ifdef TIZEN_AUTOFILL_SUPPORT
   WebDataServiceFactory* webDataServiceInstance = WebDataServiceFactory::GetInstance();
index a8ff3f7..b67f970 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2014 Samsung Electronics. All rights reserved.
+// Copyright 2014-2015 Samsung Electronics. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -82,8 +82,6 @@ class EWebContext {
   void GetAllOriginsWithFileSystem(tizen_webview::Local_File_System_Origins_Get_Callback callback, void* user_data) const;
   bool SetFaviconDatabasePath(const char *path);
   Evas_Object *AddFaviconObject(const char *uri, Evas *canvas) const;
-  void StartMemorySampler(double timerInterval) const;
-  void StopMemorySampler() const;
 
   void SendWidgetInfo(int widget_id, double scale, const std::string &theme, const std::string &encoded_bundle);
   void SendWrtMessage(const tizen_webview::WrtIpcMessageData& message);
index 56e22c6..cfd7dec 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 Samsung Electronics. All rights reserved.
+// Copyright 2014-2015 Samsung Electronics. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -240,14 +240,6 @@ void WebContext::ClearPasswordData() {
   impl->ClearPasswordData();
 }
 
-void WebContext::StartMemorySampler(double timerInterval) const {
-  impl->StartMemorySampler(timerInterval);
-}
-
-void WebContext::StopMemorySampler() const {
-  impl->StopMemorySampler();
-}
-
 unsigned int WebContext::InspectorServerStart(unsigned int port) const {
   return impl->InspectorServerStart(port);
 }
index d8f0e90..ee5a7e1 100644 (file)
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
-// Copyright 2014 Samsung Electronics. All rights reserved.
+// Copyright 2014-2015 Samsung Electronics. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -116,10 +116,6 @@ struct WebContext : public tizen_webview::RefCounted<WebContext> {
   // Password
   void ClearPasswordData();
 
-  // MemorySampler
-  void StartMemorySampler(double timerInterval) const;
-  void StopMemorySampler() const;
-
   // Set MIME override callback
   static void SetMimeOverrideCallback(Mime_Override_Callback callback);