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

Side by Side Diff: chrome/browser/enumerate_modules_model_win.cc

Issue 6336010: Add missing base::lock usage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « ceee/testing/utils/instance_count_mixin.cc ('k') | chrome_frame/com_type_info_holder.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/enumerate_modules_model_win.h" 5 #include "chrome/browser/enumerate_modules_model_win.h"
6 6
7 #include <Tlhelp32.h> 7 #include <Tlhelp32.h>
8 #include <wintrust.h> 8 #include <wintrust.h>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 if (a.location == b.location) 52 if (a.location == b.location)
53 return a.name < b.name; 53 return a.name < b.name;
54 54
55 return a.location < b.location; 55 return a.location < b.location;
56 } 56 }
57 57
58 namespace { 58 namespace {
59 59
60 // Used to protect the LoadedModuleVector which is accessed 60 // Used to protect the LoadedModuleVector which is accessed
61 // from both the UI thread and the FILE thread. 61 // from both the UI thread and the FILE thread.
62 Lock* lock = NULL; 62 base::Lock* lock = NULL;
63 63
64 // A struct to help de-duping modules before adding them to the enumerated 64 // A struct to help de-duping modules before adding them to the enumerated
65 // modules vector. 65 // modules vector.
66 struct FindModule { 66 struct FindModule {
67 public: 67 public:
68 explicit FindModule(const ModuleEnumerator::Module& x) 68 explicit FindModule(const ModuleEnumerator::Module& x)
69 : module(x) {} 69 : module(x) {}
70 bool operator()(const ModuleEnumerator::Module& module_in) const { 70 bool operator()(const ModuleEnumerator::Module& module_in) const {
71 return (module.location == module_in.location) && 71 return (module.location == module_in.location) &&
72 (module.name == module_in.name); 72 (module.name == module_in.name);
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 GenerateHash(WideToUTF8(module.name), &filename); 879 GenerateHash(WideToUTF8(module.name), &filename);
880 GenerateHash(WideToUTF8(module.location), &location); 880 GenerateHash(WideToUTF8(module.location), &location);
881 GenerateHash(WideToUTF8(module.description), &description); 881 GenerateHash(WideToUTF8(module.description), &description);
882 GenerateHash(WideToUTF8(module.digital_signer), &signer); 882 GenerateHash(WideToUTF8(module.digital_signer), &signer);
883 883
884 string16 url = l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, 884 string16 url = l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS,
885 ASCIIToUTF16(filename), ASCIIToUTF16(location), 885 ASCIIToUTF16(filename), ASCIIToUTF16(location),
886 ASCIIToUTF16(description), ASCIIToUTF16(signer)); 886 ASCIIToUTF16(description), ASCIIToUTF16(signer));
887 return GURL(UTF16ToUTF8(url)); 887 return GURL(UTF16ToUTF8(url));
888 } 888 }
OLDNEW
« no previous file with comments | « ceee/testing/utils/instance_count_mixin.cc ('k') | chrome_frame/com_type_info_holder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698