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

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

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 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
« no previous file with comments | « components/update_client/url_fetcher_downloader.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 <string> 8 #include <string>
9 #include <base/memory/scoped_ptr.h>
9 10
10 class GURL; 11 class GURL;
11 12
12 namespace base { 13 namespace base {
13 class FilePath; 14 class FilePath;
14 } 15 }
15 16
16 namespace net { 17 namespace net {
17 class URLFetcher; 18 class URLFetcher;
18 class URLFetcherDelegate; 19 class URLFetcherDelegate;
(...skipping 29 matching lines...) Expand all
48 std::string BuildProtocolRequest(const std::string& browser_version, 49 std::string BuildProtocolRequest(const std::string& browser_version,
49 const std::string& channel, 50 const std::string& channel,
50 const std::string& lang, 51 const std::string& lang,
51 const std::string& os_long_name, 52 const std::string& os_long_name,
52 const std::string& request_body, 53 const std::string& request_body,
53 const std::string& additional_attributes); 54 const std::string& additional_attributes);
54 55
55 // Sends a protocol request to the the service endpoint specified by |url|. 56 // Sends a protocol request to the the service endpoint specified by |url|.
56 // The body of the request is provided by |protocol_request| and it is 57 // The body of the request is provided by |protocol_request| and it is
57 // expected to contain XML data. The caller owns the returned object. 58 // expected to contain XML data. The caller owns the returned object.
58 net::URLFetcher* SendProtocolRequest( 59 scoped_ptr<net::URLFetcher> SendProtocolRequest(
59 const GURL& url, 60 const GURL& url,
60 const std::string& protocol_request, 61 const std::string& protocol_request,
61 net::URLFetcherDelegate* url_fetcher_delegate, 62 net::URLFetcherDelegate* url_fetcher_delegate,
62 net::URLRequestContextGetter* url_request_context_getter); 63 net::URLRequestContextGetter* url_request_context_getter);
63 64
64 // Returns true if the url request of |fetcher| was succesful. 65 // Returns true if the url request of |fetcher| was succesful.
65 bool FetchSuccess(const net::URLFetcher& fetcher); 66 bool FetchSuccess(const net::URLFetcher& fetcher);
66 67
67 // Returns the error code which occured during the fetch. The function returns 0 68 // Returns the error code which occured during the fetch. The function returns 0
68 // if the fetch was successful. If errors happen, the function could return a 69 // if the fetch was successful. If errors happen, the function could return a
(...skipping 12 matching lines...) Expand all
81 // Returns true if the file and the empty directory are deleted. 82 // Returns true if the file and the empty directory are deleted.
82 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath); 83 bool DeleteFileAndEmptyParentDirectory(const base::FilePath& filepath);
83 84
84 // Returns the component id of the |component|. The component id is in a 85 // Returns the component id of the |component|. The component id is in a
85 // format similar with the format of an extension id. 86 // format similar with the format of an extension id.
86 std::string GetCrxComponentID(const CrxComponent& component); 87 std::string GetCrxComponentID(const CrxComponent& component);
87 88
88 } // namespace update_client 89 } // namespace update_client
89 90
90 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_ 91 #endif // COMPONENTS_UPDATE_CLIENT_UTILS_H_
OLDNEW
« no previous file with comments | « components/update_client/url_fetcher_downloader.cc ('k') | components/update_client/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698