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

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

Issue 49253005: Fetch extension blacklist states from SafeBrowsing server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 Profile* profile, const std::string& name, Manifest::Type type) { 64 Profile* profile, const std::string& name, Manifest::Type type) {
65 scoped_refptr<Extension> extension = GetExtension(profile, name, type); 65 scoped_refptr<Extension> extension = GetExtension(profile, name, type);
66 if (!extension.get()) { 66 if (!extension.get()) {
67 NOTREACHED() << "Could not install extension " << name; 67 NOTREACHED() << "Could not install extension " << name;
68 return std::string(); 68 return std::string();
69 } 69 }
70 profile->GetExtensionService() 70 profile->GetExtensionService()
71 ->OnExtensionInstalled(extension.get(), 71 ->OnExtensionInstalled(extension.get(),
72 syncer::StringOrdinal(), 72 syncer::StringOrdinal(),
73 false /* no requirement errors */, 73 false /* no requirement errors */,
74 extensions::Blacklist::NOT_BLACKLISTED, 74 extensions::NOT_BLACKLISTED,
75 false /* don't wait for idle to install */); 75 false /* don't wait for idle to install */);
76 return extension->id(); 76 return extension->id();
77 } 77 }
78 78
79 void SyncExtensionHelper::UninstallExtension( 79 void SyncExtensionHelper::UninstallExtension(
80 Profile* profile, const std::string& name) { 80 Profile* profile, const std::string& name) {
81 ExtensionService::UninstallExtensionHelper( 81 ExtensionService::UninstallExtensionHelper(
82 profile->GetExtensionService(), 82 profile->GetExtensionService(),
83 extensions::id_util::GenerateId(name)); 83 extensions::id_util::GenerateId(name));
84 } 84 }
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 EXPECT_EQ(expected_id, extension->id()); 371 EXPECT_EQ(expected_id, extension->id());
372 return NULL; 372 return NULL;
373 } 373 }
374 DVLOG(2) << "created extension with name = " 374 DVLOG(2) << "created extension with name = "
375 << name << ", id = " << expected_id; 375 << name << ", id = " << expected_id;
376 (it->second)[name] = extension; 376 (it->second)[name] = extension;
377 id_to_name_[expected_id] = name; 377 id_to_name_[expected_id] = name;
378 id_to_type_[expected_id] = type; 378 id_to_type_[expected_id] = type;
379 return extension; 379 return extension;
380 } 380 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/ui/panels/base_panel_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698