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

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

Issue 282103003: Moved IS_EPHEMERAL flag to extension prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor refactoring. Added comments. Created 6 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (!extension.get()) { 68 if (!extension.get()) {
69 NOTREACHED() << "Could not install extension " << name; 69 NOTREACHED() << "Could not install extension " << name;
70 return std::string(); 70 return std::string();
71 } 71 }
72 extensions::ExtensionSystem::Get(profile) 72 extensions::ExtensionSystem::Get(profile)
73 ->extension_service() 73 ->extension_service()
74 ->OnExtensionInstalled(extension.get(), 74 ->OnExtensionInstalled(extension.get(),
75 syncer::StringOrdinal(), 75 syncer::StringOrdinal(),
76 false /* no requirement errors */, 76 false /* no requirement errors */,
77 extensions::NOT_BLACKLISTED, 77 extensions::NOT_BLACKLISTED,
78 false /* not ephemeral */,
78 false /* don't wait for idle to install */); 79 false /* don't wait for idle to install */);
79 return extension->id(); 80 return extension->id();
80 } 81 }
81 82
82 void SyncExtensionHelper::UninstallExtension( 83 void SyncExtensionHelper::UninstallExtension(
83 Profile* profile, const std::string& name) { 84 Profile* profile, const std::string& name) {
84 ExtensionService::UninstallExtensionHelper( 85 ExtensionService::UninstallExtensionHelper(
85 extensions::ExtensionSystem::Get(profile)->extension_service(), 86 extensions::ExtensionSystem::Get(profile)->extension_service(),
86 extensions::id_util::GenerateId(name)); 87 extensions::id_util::GenerateId(name));
87 } 88 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 EXPECT_EQ(expected_id, extension->id()); 389 EXPECT_EQ(expected_id, extension->id());
389 return NULL; 390 return NULL;
390 } 391 }
391 DVLOG(2) << "created extension with name = " 392 DVLOG(2) << "created extension with name = "
392 << name << ", id = " << expected_id; 393 << name << ", id = " << expected_id;
393 (it->second)[name] = extension; 394 (it->second)[name] = extension;
394 id_to_name_[expected_id] = name; 395 id_to_name_[expected_id] = name;
395 id_to_type_[expected_id] = type; 396 id_to_type_[expected_id] = type;
396 return extension; 397 return extension;
397 } 398 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698