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

Side by Side Diff: chrome/test/live_sync/sync_extension_helper.cc

Issue 7677032: ntp4: make app-install-via-drag less janky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more test fixes 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/test/live_sync/sync_extension_helper.h" 5 #include "chrome/test/live_sync/sync_extension_helper.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 setup_completed_ = true; 58 setup_completed_ = true;
59 } 59 }
60 60
61 void SyncExtensionHelper::InstallExtension( 61 void SyncExtensionHelper::InstallExtension(
62 Profile* profile, const std::string& name, Extension::Type type) { 62 Profile* profile, const std::string& name, Extension::Type type) {
63 scoped_refptr<Extension> extension = GetExtension(profile, name, type); 63 scoped_refptr<Extension> extension = GetExtension(profile, name, type);
64 ASSERT_TRUE(extension.get()) << "Could not get extension " << name 64 ASSERT_TRUE(extension.get()) << "Could not get extension " << name
65 << " (profile = " << profile << ")"; 65 << " (profile = " << profile << ")";
66 profile->GetExtensionService()->OnExtensionInstalled( 66 profile->GetExtensionService()->OnExtensionInstalled(
67 extension, extension->UpdatesFromGallery()); 67 extension, extension->UpdatesFromGallery(), 0);
68 } 68 }
69 69
70 void SyncExtensionHelper::UninstallExtension( 70 void SyncExtensionHelper::UninstallExtension(
71 Profile* profile, const std::string& name) { 71 Profile* profile, const std::string& name) {
72 ExtensionService::UninstallExtensionHelper(profile->GetExtensionService(), 72 ExtensionService::UninstallExtensionHelper(profile->GetExtensionService(),
73 NameToId(name)); 73 NameToId(name));
74 } 74 }
75 75
76 std::vector<std::string> SyncExtensionHelper::GetInstalledExtensionNames( 76 std::vector<std::string> SyncExtensionHelper::GetInstalledExtensionNames(
77 Profile* profile) const { 77 Profile* profile) const {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 if (extension->id() != expected_id) { 352 if (extension->id() != expected_id) {
353 EXPECT_EQ(expected_id, extension->id()); 353 EXPECT_EQ(expected_id, extension->id());
354 return NULL; 354 return NULL;
355 } 355 }
356 VLOG(2) << "created extension with name = " 356 VLOG(2) << "created extension with name = "
357 << name << ", id = " << expected_id; 357 << name << ", id = " << expected_id;
358 (it->second)[name] = extension; 358 (it->second)[name] = extension;
359 id_to_name_[expected_id] = name; 359 id_to_name_[expected_id] = name;
360 return extension; 360 return extension;
361 } 361 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698