Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Side by Side Diff: chrome/browser/chromeos/app_mode/fake_cws.h

Issue 271263002: New test cases for kiosk app crx file cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improvement based on comments. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/fake_cws.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_FAKE_CWS_H_
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_FAKE_CWS_H_
7
8 #include "net/test/embedded_test_server/embedded_test_server.h"
9 #include "net/test/embedded_test_server/http_request.h"
10 #include "net/test/embedded_test_server/http_response.h"
11 #include "url/gurl.h"
12
13 namespace chromeos {
14
15 class FakeCWS {
16 public:
17 FakeCWS() {}
18 virtual ~FakeCWS() {}
19
20 void Init(net::test_server::EmbeddedTestServer* embedded_test_server);
21 // Sets up the kiosk app update response.
22 void SetUpdateCrx(const std::string& app_id,
23 const std::string& crx_file,
24 const std::string& version);
25 void SetNoUpdate(const std::string& app_id);
26
27 private:
28 void SetupWebStore(const GURL& test_server_url);
29 void SetupWebStoreGalleryUrl();
30 void SetupCrxDownloadAndUpdateUrls(
31 net::test_server::EmbeddedTestServer* embedded_test_server);
32 void SetupCrxDownloadUrl();
33 void SetupCrxUpdateUrl(
34 net::test_server::EmbeddedTestServer* embedded_test_server);
35 // Sets up |update_check_content_| used in update request response later by
36 // kiosk app update server request handler |HandleRequest|.
37 void SetUpdateCheckContent(const std::string& update_check_file,
38 const GURL& crx_download_url,
39 const std::string& app_id,
40 const std::string& crx_fp,
41 const std::string& crx_size,
42 const std::string& version,
43 std::string* update_check_content);
44 // Request handler for kiosk app update server.
45 scoped_ptr<net::test_server::HttpResponse> HandleRequest(
46 const net::test_server::HttpRequest& request);
47
48 GURL web_store_url_;
49 std::string update_check_content_;
50
51 DISALLOW_COPY_AND_ASSIGN(FakeCWS);
52 };
53
54 } // namespace chromeos
55
56 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_FAKE_CWS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/fake_cws.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698