Merge lp:~dobey/unity-scope-click/revert-signall into lp:unity-scope-click

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 438
Merged at revision: 437
Proposed branch: lp:~dobey/unity-scope-click/revert-signall
Merge into: lp:unity-scope-click
Diff against target: 454 lines (+55/-109)
18 files modified
libclickscope/click/download-manager.cpp (+3/-2)
libclickscope/click/pay.cpp (+3/-0)
libclickscope/click/preview.cpp (+4/-0)
libclickscope/click/reviews.cpp (+1/-2)
libclickscope/click/ubuntuone_credentials.cpp (+1/-41)
libclickscope/click/ubuntuone_credentials.h (+2/-3)
libclickscope/click/webclient.cpp (+19/-15)
libclickscope/click/webclient.h (+1/-1)
libclickscope/tests/mock_ubuntuone_credentials.h (+5/-5)
libclickscope/tests/mock_webclient.h (+3/-2)
libclickscope/tests/test_download_manager.cpp (+4/-2)
libclickscope/tests/test_index.cpp (+1/-13)
libclickscope/tests/test_reviews.cpp (+0/-13)
libclickscope/tests/test_webclient.cpp (+8/-4)
scope/clickapps/apps-scope.cpp (+0/-2)
scope/clickapps/apps-scope.h (+0/-1)
scope/clickstore/store-scope.cpp (+0/-2)
scope/clickstore/store-scope.h (+0/-1)
To merge this branch: bzr merge lp:~dobey/unity-scope-click/revert-signall
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Review via email: mp+290482@code.launchpad.net

Commit message

Revert the change to sign all requests, as it exposes some consistent crashing.

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Looks ok.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libclickscope/click/download-manager.cpp'
--- libclickscope/click/download-manager.cpp 2016-03-02 20:30:02 +0000
+++ libclickscope/click/download-manager.cpp 2016-03-30 14:46:12 +0000
@@ -154,11 +154,11 @@
154 });154 });
155 QObject::connect(response.data(), &click::web::Response::error,155 QObject::connect(response.data(), &click::web::Response::error,
156 [this, callback, package_name](QString error, int error_code) {156 [this, callback, package_name](QString error, int error_code) {
157 qWarning() << QStringLiteral("Network error (%1) fetching click token for:").arg(error_code) << package_name.c_str();157 qDebug() << QStringLiteral("Network error (%1) fetching click token for:").arg(error_code) << package_name.c_str();
158 switch(error_code) {158 switch(error_code) {
159 case 401:159 case 401:
160 case 403:160 case 403:
161 client->invalidateCredentials();161 sso->invalidateCredentials();
162 callback(error.toUtf8().data(), Error::CredentialsError);162 callback(error.toUtf8().data(), Error::CredentialsError);
163 break;163 break;
164 default:164 default:
@@ -172,6 +172,7 @@
172void DownloadManager::setCredentialsService(const QSharedPointer<click::CredentialsService>& credentialsService)172void DownloadManager::setCredentialsService(const QSharedPointer<click::CredentialsService>& credentialsService)
173{173{
174 sso = credentialsService;174 sso = credentialsService;
175 client->setCredentialsService(sso);
175}176}
176177
177} // namespace click178} // namespace click
178179
=== modified file 'libclickscope/click/pay.cpp'
--- libclickscope/click/pay.cpp 2016-03-02 20:30:02 +0000
+++ libclickscope/click/pay.cpp 2016-03-30 14:46:12 +0000
@@ -228,6 +228,9 @@
228228
229click::web::Cancellable Package::get_purchases(std::function<void(const PurchaseSet&)> callback)229click::web::Cancellable Package::get_purchases(std::function<void(const PurchaseSet&)> callback)
230{230{
231 QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());
232 client->setCredentialsService(sso);
233
231 QSharedPointer<click::web::Response> response = client->call234 QSharedPointer<click::web::Response> response = client->call
232 (get_base_url() + pay::API_ROOT + pay::PURCHASES_API_PATH, "GET", true);235 (get_base_url() + pay::API_ROOT + pay::PURCHASES_API_PATH, "GET", true);
233236
234237
=== modified file 'libclickscope/click/preview.cpp'
--- libclickscope/click/preview.cpp 2016-03-23 21:04:12 +0000
+++ libclickscope/click/preview.cpp 2016-03-30 14:46:12 +0000
@@ -734,6 +734,8 @@
734 std::promise<bool> promise;734 std::promise<bool> promise;
735 auto future = promise.get_future();735 auto future = promise.get_future();
736 run_under_qt([this, reply, &promise]() {736 run_under_qt([this, reply, &promise]() {
737 QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());
738 dm->setCredentialsService(sso);
737 dm->start(download_url, download_sha512, result["name"].get_string(),739 dm->start(download_url, download_sha512, result["name"].get_string(),
738 [this, reply, &promise] (std::string msg, DownloadManager::Error dmerr){740 [this, reply, &promise] (std::string msg, DownloadManager::Error dmerr){
739 switch (dmerr)741 switch (dmerr)
@@ -886,6 +888,8 @@
886 std::promise<bool> submit_promise;888 std::promise<bool> submit_promise;
887 std::future<bool> submit_future = submit_promise.get_future();889 std::future<bool> submit_future = submit_promise.get_future();
888 qt::core::world::enter_with_task([this, review, &submit_promise, widget_id]() mutable {890 qt::core::world::enter_with_task([this, review, &submit_promise, widget_id]() mutable {
891 QSharedPointer<click::CredentialsService> sso(new click::CredentialsService());
892 client->setCredentialsService(sso);
889 if (widget_id == "rating") {893 if (widget_id == "rating") {
890 submit_operation = reviews->submit_review(review,894 submit_operation = reviews->submit_review(review,
891 [&submit_promise](click::Reviews::Error){895 [&submit_promise](click::Reviews::Error){
892896
=== modified file 'libclickscope/click/reviews.cpp'
--- libclickscope/click/reviews.cpp 2016-03-25 14:08:14 +0000
+++ libclickscope/click/reviews.cpp 2016-03-30 14:46:12 +0000
@@ -131,8 +131,7 @@
131 click::web::CallParams params;131 click::web::CallParams params;
132 params.add(click::REVIEWS_QUERY_ARGNAME, package_name.c_str());132 params.add(click::REVIEWS_QUERY_ARGNAME, package_name.c_str());
133 QSharedPointer<click::web::Response> response = client->call133 QSharedPointer<click::web::Response> response = client->call
134 (get_base_url() + click::REVIEWS_API_PATH, "GET", false,134 (get_base_url() + click::REVIEWS_API_PATH, params);
135 std::map<std::string, std::string>{}, "", params);
136135
137 QObject::connect(response.data(), &click::web::Response::finished,136 QObject::connect(response.data(), &click::web::Response::finished,
138 [=](QString reply) {137 [=](QString reply) {
139138
=== modified file 'libclickscope/click/ubuntuone_credentials.cpp'
--- libclickscope/click/ubuntuone_credentials.cpp 2016-03-17 16:10:23 +0000
+++ libclickscope/click/ubuntuone_credentials.cpp 2016-03-30 14:46:12 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2014-2016 Canonical Ltd.2 * Copyright (C) 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published5 * under the terms of the GNU General Public License version 3, as published
@@ -29,9 +29,6 @@
2929
30#include "ubuntuone_credentials.h"30#include "ubuntuone_credentials.h"
3131
32#include <future>
33#include <QCoreApplication>
34
35namespace u1 = UbuntuOne;32namespace u1 = UbuntuOne;
3633
37click::CredentialsService::CredentialsService()34click::CredentialsService::CredentialsService()
@@ -50,43 +47,6 @@
50{47{
51}48}
5249
53UbuntuOne::Token click::CredentialsService::getToken()
54{
55 if (!_token.isValid()) {
56 std::promise<UbuntuOne::Token> promise;
57 auto future = promise.get_future();
58
59 auto success = QObject::connect(ssoService.data(),
60 &u1::SSOService::credentialsFound,
61 [this, &promise](const u1::Token& token) {
62 emit credentialsFound(_token);
63 promise.set_value(token);
64 });
65 auto notfound = QObject::connect(ssoService.data(),
66 &u1::SSOService::credentialsNotFound,
67 [this, &promise]() {
68 qWarning() << "No Ubuntu One token found.";
69 emit credentialsNotFound();
70 promise.set_value(u1::Token());
71 });
72
73 getCredentials();
74
75 std::future_status status = future.wait_for(std::chrono::milliseconds(0));
76 while (status != std::future_status::ready) {
77 QCoreApplication::processEvents();
78 qDebug() << "Processed some events, waiting to process again.";
79 status = future.wait_for(std::chrono::milliseconds(100));
80 }
81
82 _token = future.get();
83 QObject::disconnect(success);
84 QObject::disconnect(notfound);
85 }
86
87 return _token;
88}
89
90void click::CredentialsService::getCredentials()50void click::CredentialsService::getCredentials()
91{51{
92 ssoService->getCredentials();52 ssoService->getCredentials();
9353
=== modified file 'libclickscope/click/ubuntuone_credentials.h'
--- libclickscope/click/ubuntuone_credentials.h 2016-03-03 15:52:28 +0000
+++ libclickscope/click/ubuntuone_credentials.h 2016-03-30 14:46:12 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2014-2016 Canonical Ltd.2 * Copyright (C) 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published5 * under the terms of the GNU General Public License version 3, as published
@@ -47,7 +47,6 @@
47 47
48 CredentialsService& operator=(const CredentialsService&) = delete;48 CredentialsService& operator=(const CredentialsService&) = delete;
4949
50 virtual UbuntuOne::Token getToken();
51 virtual void getCredentials();50 virtual void getCredentials();
52 virtual void invalidateCredentials();51 virtual void invalidateCredentials();
5352
@@ -58,7 +57,7 @@
5857
59private:58private:
60 QScopedPointer<UbuntuOne::SSOService> ssoService;59 QScopedPointer<UbuntuOne::SSOService> ssoService;
61 UbuntuOne::Token _token;60
62}; // CredentialsService61}; // CredentialsService
6362
64} // namespace click63} // namespace click
6564
=== modified file 'libclickscope/click/webclient.cpp'
--- libclickscope/click/webclient.cpp 2016-03-03 15:52:28 +0000
+++ libclickscope/click/webclient.cpp 2016-03-30 14:46:12 +0000
@@ -82,7 +82,7 @@
82 const std::string& iri,82 const std::string& iri,
83 const click::web::CallParams& params)83 const click::web::CallParams& params)
84{84{
85 return call(iri, "GET", true,85 return call(iri, "GET", false,
86 std::map<std::string, std::string>(), "", params);86 std::map<std::string, std::string>(), "", params);
87}87}
8888
@@ -132,21 +132,25 @@
132 request->setRawHeader(DEVICE_ID_HEADER.c_str(), deviceId.data());132 request->setRawHeader(DEVICE_ID_HEADER.c_str(), deviceId.data());
133133
134 if (sign && !impl->sso.isNull()) {134 if (sign && !impl->sso.isNull()) {
135 auto token = impl->sso->getToken();135 click::utils::SmartConnect sc(responsePtr.data());
136 if (token.isValid()) {136 sc.connect(impl->sso.data(), &click::CredentialsService::credentialsFound,
137 QString auth_header = token.signUrl(url.toString(),137 [=](const UbuntuOne::Token& token) {
138 method.c_str());138 QString auth_header = token.signUrl(url.toString(),
139 qDebug() << "Signed URL:" << request->url().toString();139 method.c_str());
140 request->setRawHeader(AUTHORIZATION_HEADER.c_str(), auth_header.toUtf8());140 qDebug() << "Signed URL:" << request->url().toString();
141 } else {141 request->setRawHeader(AUTHORIZATION_HEADER.c_str(), auth_header.toUtf8());
142 qWarning() << "Signing reuested but returned token is invalid.";142 impl->sso.clear();
143 }143 doConnect();
144144 });
145 doConnect();145 sc.connect(impl->sso.data(), &click::CredentialsService::credentialsNotFound,
146 [=]() {
147 impl->sso.clear();
148 qWarning() << "Signing reuested but no credentials found. Using unsigned URL.";
149 doConnect();
150 });
151 // TODO: Need to handle error signal once in CredentialsService.
152 impl->sso->getCredentials();
146 } else {153 } else {
147 if (sign && impl->sso.isNull()) {
148 qCritical() << "Unable to sign request without SSO object.";
149 }
150 doConnect();154 doConnect();
151 }155 }
152156
153157
=== modified file 'libclickscope/click/webclient.h'
--- libclickscope/click/webclient.h 2016-02-29 21:08:09 +0000
+++ libclickscope/click/webclient.h 2016-03-30 14:46:12 +0000
@@ -121,7 +121,7 @@
121 virtual QSharedPointer<Response> call(121 virtual QSharedPointer<Response> call(
122 const std::string& iri,122 const std::string& iri,
123 const std::string& method,123 const std::string& method,
124 bool sign = true,124 bool sign = false,
125 const std::map<std::string, std::string>& headers = std::map<std::string, std::string>(),125 const std::map<std::string, std::string>& headers = std::map<std::string, std::string>(),
126 const std::string& data = "",126 const std::string& data = "",
127 const CallParams& params = CallParams());127 const CallParams& params = CallParams());
128128
=== modified file 'libclickscope/tests/mock_ubuntuone_credentials.h'
--- libclickscope/tests/mock_ubuntuone_credentials.h 2016-03-03 15:52:28 +0000
+++ libclickscope/tests/mock_ubuntuone_credentials.h 2016-03-30 14:46:12 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2014-2016 Canonical Ltd.2 * Copyright (C) 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published5 * under the terms of the GNU General Public License version 3, as published
@@ -27,11 +27,11 @@
27 * files in the program, then also delete it here.27 * files in the program, then also delete it here.
28 */28 */
2929
30#include <token.h>
3130
32class MockCredentialsService : public click::CredentialsService {31class MockCredentialsService : public click::CredentialsService {
33 public:32 public:
34 MOCK_METHOD0(getToken, UbuntuOne::Token());33 MOCK_METHOD0(getCredentials,
35 MOCK_METHOD0(getCredentials, void());34 void());
36 MOCK_METHOD0(invalidateCredentials, void());35 MOCK_METHOD0(invalidateCredentials,
36 void());
37};37};
3838
=== modified file 'libclickscope/tests/mock_webclient.h'
--- libclickscope/tests/mock_webclient.h 2016-03-02 20:30:02 +0000
+++ libclickscope/tests/mock_webclient.h 2016-03-30 14:46:12 +0000
@@ -87,13 +87,13 @@
87 QSharedPointer<click::web::Response> call(87 QSharedPointer<click::web::Response> call(
88 const std::string& iri,88 const std::string& iri,
89 const click::web::CallParams& params=click::web::CallParams()) override {89 const click::web::CallParams& params=click::web::CallParams()) override {
90 return callImpl(iri, "GET", true,90 return callImpl(iri, "GET", false,
91 std::map<std::string, std::string>(), "", params);91 std::map<std::string, std::string>(), "", params);
92 }92 }
93 QSharedPointer<click::web::Response> call(93 QSharedPointer<click::web::Response> call(
94 const std::string& iri,94 const std::string& iri,
95 const std::string& method,95 const std::string& method,
96 bool sign = true,96 bool sign = false,
97 const std::map<std::string, std::string>& headers = std::map<std::string, std::string>(),97 const std::map<std::string, std::string>& headers = std::map<std::string, std::string>(),
98 const std::string& data = "",98 const std::string& data = "",
99 const click::web::CallParams& params=click::web::CallParams()) override {99 const click::web::CallParams& params=click::web::CallParams()) override {
@@ -102,6 +102,7 @@
102102
103 MOCK_METHOD1(has_header, bool(const std::string& header));103 MOCK_METHOD1(has_header, bool(const std::string& header));
104 MOCK_METHOD1(get_header, std::string(const std::string&header));104 MOCK_METHOD1(get_header, std::string(const std::string&header));
105 MOCK_METHOD0(invalidateCredentials, void());
105};106};
106107
107}108}
108109
=== modified file 'libclickscope/tests/test_download_manager.cpp'
--- libclickscope/tests/test_download_manager.cpp 2016-03-02 20:30:02 +0000
+++ libclickscope/tests/test_download_manager.cpp 2016-03-30 14:46:12 +0000
@@ -63,7 +63,6 @@
6363
64 virtual void SetUp()64 virtual void SetUp()
65 {65 {
66 ssoPtr.reset(new MockCredentialsService());
67 namPtr.reset(new MockNetworkAccessManager());66 namPtr.reset(new MockNetworkAccessManager());
68 clientPtr.reset(new NiceMock<MockClient>(namPtr));67 clientPtr.reset(new NiceMock<MockClient>(namPtr));
69 clientPtr->setCredentialsService(ssoPtr);68 clientPtr->setCredentialsService(ssoPtr);
@@ -161,6 +160,9 @@
161 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;160 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
162 auto response = responseForReply(reply.asSharedPtr());161 auto response = responseForReply(reply.asSharedPtr());
163162
163 QSharedPointer<MockCredentialsService> sso(new MockCredentialsService());
164 dmPtr->setCredentialsService(sso);
165
164 EXPECT_CALL(reply.instance, errorString())166 EXPECT_CALL(reply.instance, errorString())
165 .WillOnce(Return(QString("ERROR")));167 .WillOnce(Return(QString("ERROR")));
166 EXPECT_CALL(reply.instance, attribute(_)).WillOnce(Return(QVariant(401)));168 EXPECT_CALL(reply.instance, attribute(_)).WillOnce(Return(QVariant(401)));
@@ -170,7 +172,7 @@
170 EXPECT_CALL(*clientPtr, callImpl(_, _, _, _, _, _))172 EXPECT_CALL(*clientPtr, callImpl(_, _, _, _, _, _))
171 .Times(1)173 .Times(1)
172 .WillOnce(Return(response));174 .WillOnce(Return(response));
173 EXPECT_CALL(*ssoPtr, invalidateCredentials());175 EXPECT_CALL(*(sso.data()), invalidateCredentials());
174 EXPECT_CALL(*this, start_callback("ERROR (201)",176 EXPECT_CALL(*this, start_callback("ERROR (201)",
175 click::DownloadManager::Error::CredentialsError)).Times(1);177 click::DownloadManager::Error::CredentialsError)).Times(1);
176178
177179
=== modified file 'libclickscope/tests/test_index.cpp'
--- libclickscope/tests/test_index.cpp 2016-03-23 21:04:12 +0000
+++ libclickscope/tests/test_index.cpp 2016-03-30 14:46:12 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2014-2016 Canonical Ltd.2 * Copyright (C) 2014 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 3, as published5 * under the terms of the GNU General Public License version 3, as published
@@ -190,18 +190,6 @@
190 indexPtr->departments("departments", [](const click::DepartmentList&, const click::HighlightList&, click::Index::Error, int) {});190 indexPtr->departments("departments", [](const click::DepartmentList&, const click::HighlightList&, click::Index::Error, int) {});
191}191}
192192
193TEST_F(IndexTest, testDetailsSignsCall)
194{
195 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
196 auto response = responseForReply(reply.asSharedPtr());
197
198 EXPECT_CALL(*clientPtr, callImpl(_, _, true, _, _, _))
199 .Times(1)
200 .WillOnce(Return(response));
201
202 indexPtr->get_details("fake-app", [](const click::PackageDetails, click::Index::Error) {});
203}
204
205TEST_F(IndexTest, testSearchSendsRightPath)193TEST_F(IndexTest, testSearchSendsRightPath)
206{194{
207 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;195 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
208196
=== modified file 'libclickscope/tests/test_reviews.cpp'
--- libclickscope/tests/test_reviews.cpp 2016-03-25 14:08:14 +0000
+++ libclickscope/tests/test_reviews.cpp 2016-03-30 14:46:12 +0000
@@ -150,19 +150,6 @@
150 click::Reviews::Error) {});150 click::Reviews::Error) {});
151}151}
152152
153TEST_F(ReviewsTest, testFetchReviewsDoesNotSignCall)
154{
155 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
156 auto response = responseForReply(reply.asSharedPtr());
157
158 EXPECT_CALL(*clientPtr, callImpl(_, _, false, _, _, _))
159 .Times(1)
160 .WillOnce(Return(response));
161
162 reviewsPtr->fetch_reviews("", [](click::ReviewList,
163 click::Reviews::Error) {});
164}
165
166TEST_F(ReviewsTest, testFetchReviewsSendsQueryAsParam)153TEST_F(ReviewsTest, testFetchReviewsSendsQueryAsParam)
167{154{
168 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;155 LifetimeHelper<click::network::Reply, MockNetworkReply> reply;
169156
=== modified file 'libclickscope/tests/test_webclient.cpp'
--- libclickscope/tests/test_webclient.cpp 2016-03-03 15:52:28 +0000
+++ libclickscope/tests/test_webclient.cpp 2016-03-30 14:46:12 +0000
@@ -221,9 +221,11 @@
221 click::web::Client wc(namPtr);221 click::web::Client wc(namPtr);
222 wc.setCredentialsService(ssoPtr);222 wc.setCredentialsService(ssoPtr);
223223
224 EXPECT_CALL(sso, getToken())224 EXPECT_CALL(sso, getCredentials()).WillOnce(Invoke([&](){
225 .WillOnce(Return(UbuntuOne::Token("token_key", "token_secret",225 UbuntuOne::Token token("token_key", "token_secret",
226 "consumer_key", "consumer_secret")));226 "consumer_key", "consumer_secret");
227 sso.credentialsFound(token);
228 }));
227 EXPECT_CALL(nam, sendCustomRequest(IsValidOAuthHeader(true), _, _))229 EXPECT_CALL(nam, sendCustomRequest(IsValidOAuthHeader(true), _, _))
228 .Times(1)230 .Times(1)
229 .WillOnce(Return(replyPtr));231 .WillOnce(Return(replyPtr));
@@ -269,7 +271,9 @@
269 click::web::Client wc(namPtr);271 click::web::Client wc(namPtr);
270 wc.setCredentialsService(ssoPtr);272 wc.setCredentialsService(ssoPtr);
271273
272 EXPECT_CALL(sso, getToken()).WillOnce(Return(UbuntuOne::Token()));274 EXPECT_CALL(sso, getCredentials()).WillOnce(Invoke([&]() {
275 sso.credentialsNotFound();
276 }));
273 EXPECT_CALL(nam, sendCustomRequest(IsValidOAuthHeader(false), _, _))277 EXPECT_CALL(nam, sendCustomRequest(IsValidOAuthHeader(false), _, _))
274 .Times(1)278 .Times(1)
275 .WillOnce(Return(replyPtr));279 .WillOnce(Return(replyPtr));
276280
=== modified file 'scope/clickapps/apps-scope.cpp'
--- scope/clickapps/apps-scope.cpp 2016-03-01 16:46:30 +0000
+++ scope/clickapps/apps-scope.cpp 2016-03-30 14:46:12 +0000
@@ -81,8 +81,6 @@
81 static const int zero = 0;81 static const int zero = 0;
82 auto emptyCb = [this]()82 auto emptyCb = [this]()
83 {83 {
84 sso.reset(new click::CredentialsService());
85 client->setCredentialsService(sso);
86 dm.reset(Ubuntu::DownloadManager::Manager::createSessionManager());84 dm.reset(Ubuntu::DownloadManager::Manager::createSessionManager());
87 };85 };
8886
8987
=== modified file 'scope/clickapps/apps-scope.h'
--- scope/clickapps/apps-scope.h 2016-03-01 16:46:30 +0000
+++ scope/clickapps/apps-scope.h 2016-03-30 14:46:12 +0000
@@ -71,7 +71,6 @@
71 QSharedPointer<click::Index> index;71 QSharedPointer<click::Index> index;
72 QSharedPointer<pay::Package> pay_package;72 QSharedPointer<pay::Package> pay_package;
73 QSharedPointer<Ubuntu::DownloadManager::Manager> dm;73 QSharedPointer<Ubuntu::DownloadManager::Manager> dm;
74 QSharedPointer<click::CredentialsService> sso;
75 std::shared_ptr<click::DepartmentsDb> depts_db;74 std::shared_ptr<click::DepartmentsDb> depts_db;
7675
77 std::string installApplication(unity::scopes::Result const& result);76 std::string installApplication(unity::scopes::Result const& result);
7877
=== modified file 'scope/clickstore/store-scope.cpp'
--- scope/clickstore/store-scope.cpp 2016-03-23 21:04:12 +0000
+++ scope/clickstore/store-scope.cpp 2016-03-30 14:46:12 +0000
@@ -83,8 +83,6 @@
83 static const int zero = 0;83 static const int zero = 0;
84 auto emptyCb = [this]()84 auto emptyCb = [this]()
85 {85 {
86 sso.reset(new click::CredentialsService());
87 client->setCredentialsService(sso);
88 dm.reset(Ubuntu::DownloadManager::Manager::createSessionManager());86 dm.reset(Ubuntu::DownloadManager::Manager::createSessionManager());
89 };87 };
9088
9189
=== modified file 'scope/clickstore/store-scope.h'
--- scope/clickstore/store-scope.h 2016-02-29 21:58:00 +0000
+++ scope/clickstore/store-scope.h 2016-03-30 14:46:12 +0000
@@ -74,7 +74,6 @@
74 QSharedPointer<click::Index> index;74 QSharedPointer<click::Index> index;
75 QSharedPointer<pay::Package> pay_package;75 QSharedPointer<pay::Package> pay_package;
76 QSharedPointer<Ubuntu::DownloadManager::Manager> dm;76 QSharedPointer<Ubuntu::DownloadManager::Manager> dm;
77 QSharedPointer<click::CredentialsService> sso;
78 std::shared_ptr<click::DepartmentLookup> depts;77 std::shared_ptr<click::DepartmentLookup> depts;
79 std::shared_ptr<click::HighlightList> highlights;78 std::shared_ptr<click::HighlightList> highlights;
80 std::shared_ptr<click::DepartmentsDb> depts_db;79 std::shared_ptr<click::DepartmentsDb> depts_db;

Subscribers

People subscribed via source and target branches

to all changes: