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

Side by Side Diff: net/base/mime_util.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <unordered_set> 9 #include <unordered_set>
10 10
(...skipping 30 matching lines...) Expand all
41 bool MatchesMimeType(const std::string &mime_type_pattern, 41 bool MatchesMimeType(const std::string &mime_type_pattern,
42 const std::string &mime_type) const; 42 const std::string &mime_type) const;
43 43
44 bool ParseMimeTypeWithoutParameter(const std::string& type_string, 44 bool ParseMimeTypeWithoutParameter(const std::string& type_string,
45 std::string* top_level_type, 45 std::string* top_level_type,
46 std::string* subtype) const; 46 std::string* subtype) const;
47 47
48 bool IsValidTopLevelMimeType(const std::string& type_string) const; 48 bool IsValidTopLevelMimeType(const std::string& type_string) const;
49 49
50 private: 50 private:
51 friend struct base::DefaultLazyInstanceTraits<MimeUtil>; 51 friend struct base::LazyInstanceTraitsBase<MimeUtil>;
52 52
53 MimeUtil(); 53 MimeUtil();
54 54
55 bool GetMimeTypeFromExtensionHelper(const base::FilePath::StringType& ext, 55 bool GetMimeTypeFromExtensionHelper(const base::FilePath::StringType& ext,
56 bool include_platform_types, 56 bool include_platform_types,
57 std::string* mime_type) const; 57 std::string* mime_type) const;
58 }; // class MimeUtil 58 }; // class MimeUtil
59 59
60 // This variable is Leaky because we need to access it from WorkerPool threads. 60 // This variable is Leaky because we need to access it from WorkerPool threads.
61 static base::LazyInstance<MimeUtil>::Leaky g_mime_util = 61 static base::LazyInstance<MimeUtil>::Leaky g_mime_util =
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 post_data->append("\r\n" + value + "\r\n"); 638 post_data->append("\r\n" + value + "\r\n");
639 } 639 }
640 640
641 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, 641 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary,
642 std::string* post_data) { 642 std::string* post_data) {
643 DCHECK(post_data); 643 DCHECK(post_data);
644 post_data->append("--" + mime_boundary + "--\r\n"); 644 post_data->append("--" + mime_boundary + "--\r\n");
645 } 645 }
646 646
647 } // namespace net 647 } // namespace net
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/sync_call_restrictions.cc ('k') | net/base/network_activity_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698