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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 bool SyncExtensionHelper::ExtensionState::Equals( 46 bool SyncExtensionHelper::ExtensionState::Equals(
47 const SyncExtensionHelper::ExtensionState &other) const { 47 const SyncExtensionHelper::ExtensionState &other) const {
48 return ((enabled_state == other.enabled_state) && 48 return ((enabled_state == other.enabled_state) &&
49 (disable_reasons == other.disable_reasons) && 49 (disable_reasons == other.disable_reasons) &&
50 (incognito_enabled == other.incognito_enabled)); 50 (incognito_enabled == other.incognito_enabled));
51 } 51 }
52 52
53 // static 53 // static
54 SyncExtensionHelper* SyncExtensionHelper::GetInstance() { 54 SyncExtensionHelper* SyncExtensionHelper::GetInstance() {
55 SyncExtensionHelper* instance = Singleton<SyncExtensionHelper>::get(); 55 SyncExtensionHelper* instance = base::Singleton<SyncExtensionHelper>::get();
56 instance->SetupIfNecessary(sync_datatype_helper::test()); 56 instance->SetupIfNecessary(sync_datatype_helper::test());
57 return instance; 57 return instance;
58 } 58 }
59 59
60 SyncExtensionHelper::SyncExtensionHelper() : setup_completed_(false) {} 60 SyncExtensionHelper::SyncExtensionHelper() : setup_completed_(false) {}
61 61
62 SyncExtensionHelper::~SyncExtensionHelper() {} 62 SyncExtensionHelper::~SyncExtensionHelper() {}
63 63
64 void SyncExtensionHelper::SetupIfNecessary(SyncTest* test) { 64 void SyncExtensionHelper::SetupIfNecessary(SyncTest* test) {
65 if (setup_completed_) 65 if (setup_completed_)
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 EXPECT_EQ(expected_id, extension->id()); 429 EXPECT_EQ(expected_id, extension->id());
430 return NULL; 430 return NULL;
431 } 431 }
432 DVLOG(2) << "created extension with name = " 432 DVLOG(2) << "created extension with name = "
433 << name << ", id = " << expected_id; 433 << name << ", id = " << expected_id;
434 (it->second)[name] = extension; 434 (it->second)[name] = extension;
435 id_to_name_[expected_id] = name; 435 id_to_name_[expected_id] = name;
436 id_to_type_[expected_id] = type; 436 id_to_type_[expected_id] = type;
437 return extension; 437 return extension;
438 } 438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698