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

Side by Side Diff: chrome/browser/sync/test/integration/sync_extension_helper.cc

Issue 284103002: Replace "external_install" boolean parameter with explicit enumeration in ExtensionUninstall method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issue exposed by failing unit test. Created 6 years, 5 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 | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/themes/theme_service.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 (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 "chrome/browser/sync/test/integration/sync_extension_helper.h" 5 #include "chrome/browser/sync/test/integration/sync_extension_helper.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ->OnExtensionInstalled(extension.get(), 75 ->OnExtensionInstalled(extension.get(),
76 syncer::StringOrdinal(), 76 syncer::StringOrdinal(),
77 extensions::kInstallFlagInstallImmediately); 77 extensions::kInstallFlagInstallImmediately);
78 return extension->id(); 78 return extension->id();
79 } 79 }
80 80
81 void SyncExtensionHelper::UninstallExtension( 81 void SyncExtensionHelper::UninstallExtension(
82 Profile* profile, const std::string& name) { 82 Profile* profile, const std::string& name) {
83 ExtensionService::UninstallExtensionHelper( 83 ExtensionService::UninstallExtensionHelper(
84 extensions::ExtensionSystem::Get(profile)->extension_service(), 84 extensions::ExtensionSystem::Get(profile)->extension_service(),
85 extensions::id_util::GenerateId(name)); 85 extensions::id_util::GenerateId(name),
86 ExtensionService::UNINSTALL_REASON_SYNC);
86 } 87 }
87 88
88 std::vector<std::string> SyncExtensionHelper::GetInstalledExtensionNames( 89 std::vector<std::string> SyncExtensionHelper::GetInstalledExtensionNames(
89 Profile* profile) const { 90 Profile* profile) const {
90 std::vector<std::string> names; 91 std::vector<std::string> names;
91 92
92 scoped_ptr<const extensions::ExtensionSet> extensions( 93 scoped_ptr<const extensions::ExtensionSet> extensions(
93 extensions::ExtensionRegistry::Get(profile) 94 extensions::ExtensionRegistry::Get(profile)
94 ->GenerateInstalledExtensionsSet()); 95 ->GenerateInstalledExtensionsSet());
95 for (extensions::ExtensionSet::const_iterator it = extensions->begin(); 96 for (extensions::ExtensionSet::const_iterator it = extensions->begin();
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 EXPECT_EQ(expected_id, extension->id()); 388 EXPECT_EQ(expected_id, extension->id());
388 return NULL; 389 return NULL;
389 } 390 }
390 DVLOG(2) << "created extension with name = " 391 DVLOG(2) << "created extension with name = "
391 << name << ", id = " << expected_id; 392 << name << ", id = " << expected_id;
392 (it->second)[name] = extension; 393 (it->second)[name] = extension;
393 id_to_name_[expected_id] = name; 394 id_to_name_[expected_id] = name;
394 id_to_type_[expected_id] = type; 395 id_to_type_[expected_id] = type;
395 return extension; 396 return extension;
396 } 397 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698