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

Side by Side Diff: components/update_client/utils.h

Issue 2479633003: Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « components/update_client/update_client_unittest.cc ('k') | components/update_client/utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_UPDATE_CLIENT_UTILS_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_UTILS_H_
6 #define COMPONENTS_UPDATE_CLIENT_UTILS_H_ 6 #define COMPONENTS_UPDATE_CLIENT_UTILS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback_forward.h"
14 #include "components/update_client/update_client.h"
13 15
14 class GURL; 16 class GURL;
15 17
16 namespace base { 18 namespace base {
19 class DictionaryValue;
17 class FilePath; 20 class FilePath;
18 } 21 }
19 22
20 namespace net { 23 namespace net {
21 class URLFetcher; 24 class URLFetcher;
22 class URLFetcherDelegate; 25 class URLFetcherDelegate;
23 class URLRequestContextGetter; 26 class URLRequestContextGetter;
24 } 27 }
25 28
26 namespace update_client { 29 namespace update_client {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool IsValidBrand(const std::string& brand); 110 bool IsValidBrand(const std::string& brand);
108 111
109 // Returns true if the name part of the |attr| parameter matches 112 // Returns true if the name part of the |attr| parameter matches
110 // ^[-_a-zA-Z0-9]{1,256}$ and the value part of the |attr| parameter 113 // ^[-_a-zA-Z0-9]{1,256}$ and the value part of the |attr| parameter
111 // matches ^[-.,;+_=a-zA-Z0-9]{0,256}$ . 114 // matches ^[-.,;+_=a-zA-Z0-9]{0,256}$ .
112 bool IsValidInstallerAttribute(const InstallerAttribute& attr); 115 bool IsValidInstallerAttribute(const InstallerAttribute& attr);
113 116
114 // Removes the unsecure urls in the |urls| parameter. 117 // Removes the unsecure urls in the |urls| parameter.
115 void RemoveUnsecureUrls(std::vector<GURL>* urls); 118 void RemoveUnsecureUrls(std::vector<GURL>* urls);
116 119
120 // Adapter function for the old definitions of CrxInstaller::Install until the
121 // component installer code is migrated to use a REsult instead of bool.
122 CrxInstaller::Result InstallFunctionWrapper(base::Callback<bool()> callback);
123
117 } // namespace update_client 124 } // namespace update_client
118 125
119 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ 126 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_
OLDNEW
« no previous file with comments | « components/update_client/update_client_unittest.cc ('k') | components/update_client/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698