Upstream version 10.38.210.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / runtime_context.cc
index 6d17fc4..85b98b3 100644 (file)
@@ -1,4 +1,5 @@
 // Copyright (c) 2013 Intel Corporation. All rights reserved.
+// Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -197,6 +198,16 @@ content::SSLHostStateDelegate* RuntimeContext::GetSSLHostStateDelegate() {
   return NULL;
 }
 
+RuntimeURLRequestContextGetter* RuntimeContext::GetURLRequestContextGetterById(
+    const std::string& pkg_id) {
+  for (PartitionPathContextGetterMap::iterator it = context_getters_.begin();
+       it != context_getters_.end(); ++it) {
+    if (it->first.find(pkg_id))
+      return it->second.get();
+  }
+  return 0;
+}
+
 net::URLRequestContextGetter* RuntimeContext::CreateRequestContext(
     content::ProtocolHandlerMap* protocol_handlers,
     content::URLRequestInterceptorScopedVector request_interceptors) {