| OLD | NEW |
| 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/extensions_helper.h" | 5 #include "chrome/browser/sync/test/integration/extensions_helper.h" |
| 6 | 6 |
| 7 #include <cstring> | 7 #include <cstring> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 13 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
| 14 #include "chrome/browser/sync/test/integration/sync_extension_helper.h" | 14 #include "chrome/browser/sync/test/integration/sync_extension_helper.h" |
| 15 #include "chrome/common/extensions/manifest.h" | 15 #include "extensions/common/manifest.h" |
| 16 | 16 |
| 17 using sync_datatype_helper::test; | 17 using sync_datatype_helper::test; |
| 18 | 18 |
| 19 namespace extensions_helper { | 19 namespace extensions_helper { |
| 20 | 20 |
| 21 const char extension_name_prefix[] = "fakeextension"; | 21 const char extension_name_prefix[] = "fakeextension"; |
| 22 | 22 |
| 23 bool HasSameExtensionsAsVerifier(int index) { | 23 bool HasSameExtensionsAsVerifier(int index) { |
| 24 return SyncExtensionHelper::GetInstance()->ExtensionStatesMatch( | 24 return SyncExtensionHelper::GetInstance()->ExtensionStatesMatch( |
| 25 test()->GetProfile(index), test()->verifier()); | 25 test()->GetProfile(index), test()->verifier()); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 if (!StartsWithASCII(name, extension_name_prefix, true) || | 123 if (!StartsWithASCII(name, extension_name_prefix, true) || |
| 124 !base::StringToInt(name.substr(strlen(extension_name_prefix)), index)) { | 124 !base::StringToInt(name.substr(strlen(extension_name_prefix)), index)) { |
| 125 LOG(WARNING) << "Unable to convert extension name \"" << name | 125 LOG(WARNING) << "Unable to convert extension name \"" << name |
| 126 << "\" to index"; | 126 << "\" to index"; |
| 127 return false; | 127 return false; |
| 128 } | 128 } |
| 129 return true; | 129 return true; |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace extensions_helper | 132 } // namespace extensions_helper |
| OLD | NEW |