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

Side by Side Diff: chrome/browser/diagnostics/recon_diagnostics.cc

Issue 7606032: Fix memory leak in ConflictingDllsTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
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/diagnostics/recon_diagnostics.h" 5 #include "chrome/browser/diagnostics/recon_diagnostics.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 public: 75 public:
76 ConflictingDllsTest() : DiagnosticTest(ASCIIToUTF16("Conflicting modules")) {} 76 ConflictingDllsTest() : DiagnosticTest(ASCIIToUTF16("Conflicting modules")) {}
77 77
78 virtual int GetId() { return 0; } 78 virtual int GetId() { return 0; }
79 79
80 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { 80 virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) {
81 #if defined(OS_WIN) 81 #if defined(OS_WIN)
82 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance(); 82 EnumerateModulesModel* model = EnumerateModulesModel::GetInstance();
83 model->set_limited_mode(true); 83 model->set_limited_mode(true);
84 model->ScanNow(); 84 model->ScanNow();
85 ListValue* list = model->GetModuleList(); 85 scoped_ptr<ListValue> list(model->GetModuleList());
86 if (!model->confirmed_bad_modules_detected() && 86 if (!model->confirmed_bad_modules_detected() &&
87 !model->suspected_bad_modules_detected()) { 87 !model->suspected_bad_modules_detected()) {
88 RecordSuccess(ASCIIToUTF16("No conflicting modules found")); 88 RecordSuccess(ASCIIToUTF16("No conflicting modules found"));
89 return true; 89 return true;
90 } 90 }
91 91
92 string16 failures = ASCIIToUTF16("Possibly conflicting modules:"); 92 string16 failures = ASCIIToUTF16("Possibly conflicting modules:");
93 DictionaryValue* dictionary; 93 DictionaryValue* dictionary;
94 for (size_t i = 0; i < list->GetSize(); ++i) { 94 for (size_t i = 0; i < list->GetSize(); ++i) {
95 if (!list->GetDictionary(i, &dictionary)) 95 if (!list->GetDictionary(i, &dictionary))
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 path = path.Append(chrome::kBookmarksFileName); 415 path = path.Append(chrome::kBookmarksFileName);
416 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg); 416 return new JSONTest(path, ASCIIToUTF16("BookMarks JSON"), 2 * kOneMeg);
417 } 417 }
418 418
419 DiagnosticTest* MakeLocalStateTest() { 419 DiagnosticTest* MakeLocalStateTest() {
420 FilePath path; 420 FilePath path;
421 PathService::Get(chrome::DIR_USER_DATA, &path); 421 PathService::Get(chrome::DIR_USER_DATA, &path);
422 path = path.Append(chrome::kLocalStateFilename); 422 path = path.Append(chrome::kLocalStateFilename);
423 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo); 423 return new JSONTest(path, ASCIIToUTF16("Local State JSON"), 50 * kOneKilo);
424 } 424 }
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/drmemory/suppressions.txt » ('j') | tools/valgrind/drmemory/suppressions.txt » ('J')

Powered by Google App Engine
This is Rietveld 408576698