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

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

Issue 2365763002: [Sync] Removed passphrase helper methods, removed ((n)) pattern, and fixed lint violations. (Closed)
Patch Set: Removed useless pass-through accessors. Created 4 years, 2 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 <list>
8 #include <memory>
9 #include <utility>
10
7 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
9 #include "base/guid.h" 13 #include "base/guid.h"
10 #include "base/logging.h" 14 #include "base/logging.h"
11 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
13 #include "base/values.h" 17 #include "base/values.h"
14 #include "chrome/browser/extensions/extension_service.h" 18 #include "chrome/browser/extensions/extension_service.h"
15 #include "chrome/browser/extensions/extension_util.h" 19 #include "chrome/browser/extensions/extension_util.h"
16 #include "chrome/browser/extensions/pending_extension_info.h" 20 #include "chrome/browser/extensions/pending_extension_info.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 extensions::ExtensionSystem::Get(profile) 183 extensions::ExtensionSystem::Get(profile)
180 ->extension_service() 184 ->extension_service()
181 ->pending_extension_manager(); 185 ->pending_extension_manager();
182 186
183 std::list<std::string> pending_crx_ids; 187 std::list<std::string> pending_crx_ids;
184 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids); 188 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids);
185 189
186 std::list<std::string>::const_iterator iter; 190 std::list<std::string>::const_iterator iter;
187 const extensions::PendingExtensionInfo* info = NULL; 191 const extensions::PendingExtensionInfo* info = NULL;
188 for (iter = pending_crx_ids.begin(); iter != pending_crx_ids.end(); ++iter) { 192 for (iter = pending_crx_ids.begin(); iter != pending_crx_ids.end(); ++iter) {
189 ASSERT_TRUE((info = pending_extension_manager->GetById(*iter))); 193 ASSERT_TRUE(info = pending_extension_manager->GetById(*iter));
190 if (!info->is_from_sync()) 194 if (!info->is_from_sync())
191 continue; 195 continue;
192 196
193 StringMap::const_iterator iter2 = id_to_name_.find(*iter); 197 StringMap::const_iterator iter2 = id_to_name_.find(*iter);
194 if (iter2 == id_to_name_.end()) { 198 if (iter2 == id_to_name_.end()) {
195 ADD_FAILURE() << "Could not get name for id " << *iter 199 ADD_FAILURE() << "Could not get name for id " << *iter
196 << " (profile = " << profile->GetDebugName() << ")"; 200 << " (profile = " << profile->GetDebugName() << ")";
197 continue; 201 continue;
198 } 202 }
199 TypeMap::const_iterator iter3 = id_to_type_.find(*iter); 203 TypeMap::const_iterator iter3 = id_to_type_.find(*iter);
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 EXPECT_EQ(expected_id, extension->id()); 429 EXPECT_EQ(expected_id, extension->id());
426 return NULL; 430 return NULL;
427 } 431 }
428 DVLOG(2) << "created extension with name = " 432 DVLOG(2) << "created extension with name = "
429 << name << ", id = " << expected_id; 433 << name << ", id = " << expected_id;
430 (it->second)[name] = extension; 434 (it->second)[name] = extension;
431 id_to_name_[expected_id] = name; 435 id_to_name_[expected_id] = name;
432 id_to_type_[expected_id] = type; 436 id_to_type_[expected_id] = type;
433 return extension; 437 return extension;
434 } 438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698