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

Side by Side Diff: chrome/browser/extensions/api/settings_overrides/settings_overrides_browsertest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/prefs/session_startup_pref.h" 10 #include "chrome/browser/prefs/session_startup_pref.h"
(...skipping 17 matching lines...) Expand all
28 base::Unretained(this))); 28 base::Unretained(this)));
29 service->Load(); 29 service->Load();
30 } 30 }
31 ~TemplateURLServiceObserver() {} 31 ~TemplateURLServiceObserver() {}
32 32
33 private: 33 private:
34 void StopLoop() { 34 void StopLoop() {
35 runner_->Quit(); 35 runner_->Quit();
36 } 36 }
37 base::RunLoop* runner_; 37 base::RunLoop* runner_;
38 scoped_ptr<TemplateURLService::Subscription> template_url_sub_; 38 std::unique_ptr<TemplateURLService::Subscription> template_url_sub_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceObserver); 40 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceObserver);
41 }; 41 };
42 42
43 testing::AssertionResult VerifyTemplateURLServiceLoad( 43 testing::AssertionResult VerifyTemplateURLServiceLoad(
44 TemplateURLService* service) { 44 TemplateURLService* service) {
45 if (service->loaded()) 45 if (service->loaded())
46 return testing::AssertionSuccess(); 46 return testing::AssertionSuccess();
47 base::RunLoop runner; 47 base::RunLoop runner;
48 TemplateURLServiceObserver observer(service, &runner); 48 TemplateURLServiceObserver observer(service, &runner);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ASSERT_TRUE(extension); 126 ASSERT_TRUE(extension);
127 ASSERT_EQ(1u, extension->install_warnings().size()); 127 ASSERT_EQ(1u, extension->install_warnings().size());
128 EXPECT_EQ(std::string( 128 EXPECT_EQ(std::string(
129 "'chrome_settings_overrides' " 129 "'chrome_settings_overrides' "
130 "is not allowed for specified platform."), 130 "is not allowed for specified platform."),
131 extension->install_warnings().front().message); 131 extension->install_warnings().front().message);
132 #endif 132 #endif
133 } 133 }
134 134
135 } // namespace 135 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698