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

Side by Side Diff: chrome/browser/extensions/bookmark_app_helper.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/bookmark_app_helper.h" 5 #include "chrome/browser/extensions/bookmark_app_helper.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/extensions/crx_installer.h" 10 #include "chrome/browser/extensions/crx_installer.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 public: 45 public:
46 explicit GeneratedIconImageSource(char letter, SkColor color, int output_size) 46 explicit GeneratedIconImageSource(char letter, SkColor color, int output_size)
47 : gfx::CanvasImageSource(gfx::Size(output_size, output_size), false), 47 : gfx::CanvasImageSource(gfx::Size(output_size, output_size), false),
48 letter_(letter), 48 letter_(letter),
49 color_(color), 49 color_(color),
50 output_size_(output_size) {} 50 output_size_(output_size) {}
51 virtual ~GeneratedIconImageSource() {} 51 virtual ~GeneratedIconImageSource() {}
52 52
53 private: 53 private:
54 // gfx::CanvasImageSource overrides: 54 // gfx::CanvasImageSource overrides:
55 virtual void Draw(gfx::Canvas* canvas) OVERRIDE { 55 virtual void Draw(gfx::Canvas* canvas) override {
56 const unsigned char kLuminanceThreshold = 190; 56 const unsigned char kLuminanceThreshold = 190;
57 const int icon_size = output_size_ * 3 / 4; 57 const int icon_size = output_size_ * 3 / 4;
58 const int icon_inset = output_size_ / 8; 58 const int icon_inset = output_size_ / 8;
59 const size_t border_radius = output_size_ / 16; 59 const size_t border_radius = output_size_ / 16;
60 const size_t font_size = output_size_ * 7 / 16; 60 const size_t font_size = output_size_ * 7 / 16;
61 61
62 std::string font_name = 62 std::string font_name =
63 l10n_util::GetStringUTF8(IDS_SANS_SERIF_FONT_FAMILY); 63 l10n_util::GetStringUTF8(IDS_SANS_SERIF_FONT_FAMILY);
64 #if defined(OS_CHROMEOS) 64 #if defined(OS_CHROMEOS)
65 const std::string kChromeOSFontFamily = "Noto Sans"; 65 const std::string kChromeOSFontFamily = "Noto Sans";
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 extension, info_list, base::Bind(&OnIconsLoaded, web_app_info, callback)); 388 extension, info_list, base::Bind(&OnIconsLoaded, web_app_info, callback));
389 } 389 }
390 390
391 bool IsValidBookmarkAppUrl(const GURL& url) { 391 bool IsValidBookmarkAppUrl(const GURL& url) {
392 URLPattern origin_only_pattern(Extension::kValidWebExtentSchemes); 392 URLPattern origin_only_pattern(Extension::kValidWebExtentSchemes);
393 origin_only_pattern.SetMatchAllURLs(true); 393 origin_only_pattern.SetMatchAllURLs(true);
394 return url.is_valid() && origin_only_pattern.MatchesURL(url); 394 return url.is_valid() && origin_only_pattern.MatchesURL(url);
395 } 395 }
396 396
397 } // namespace extensions 397 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/bookmark_app_helper.h ('k') | chrome/browser/extensions/bookmark_app_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698