1 // Copyright (c) 2014 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "xwalk/application/common/tizen/signature_data.h"
7 #include "base/strings/utf_string_conversions.h"
10 namespace application {
12 SignatureData::SignatureData(const std::string& signature_file_name,
14 : signature_file_name_(signature_file_name),
15 signature_number_(signature_number) {
18 SignatureData::~SignatureData() {
21 base::FilePath SignatureData::GetExtractedWidgetPath() const {
22 std::string widget_path = signature_file_name();
23 size_t pos = widget_path.rfind('/');
24 if (pos == std::string::npos) {
27 widget_path.erase(pos + 1, std::string::npos);
30 return base::FilePath(base::UTF8ToWide(widget_path));
32 return base::FilePath(widget_path);
36 } // namespace application